{"id":18469056,"url":"https://github.com/sansible/php","last_synced_at":"2025-04-08T10:32:35.248Z","repository":{"id":46814217,"uuid":"50594414","full_name":"sansible/php","owner":"sansible","description":"See https://github.com/sansible/sansible for more information","archived":false,"fork":false,"pushed_at":"2023-01-24T23:25:26.000Z","size":56,"stargazers_count":3,"open_issues_count":2,"forks_count":3,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-03-23T11:04:40.911Z","etag":null,"topics":["ansible","ansible-role","ansible-roles","php"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sansible.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-28T15:58:21.000Z","updated_at":"2021-06-15T09:53:20.000Z","dependencies_parsed_at":"2023-02-14T02:31:12.251Z","dependency_job_id":null,"html_url":"https://github.com/sansible/php","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sansible%2Fphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sansible%2Fphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sansible%2Fphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sansible%2Fphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sansible","download_url":"https://codeload.github.com/sansible/php/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247824177,"owners_count":21002224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","ansible-roles","php"],"created_at":"2024-11-06T10:08:51.802Z","updated_at":"2025-04-08T10:32:33.970Z","avatar_url":"https://github.com/sansible.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP\n\nMaster: ![Build Status](https://travis-ci.org/sansible/php.svg?branch=master)\nDevelop: ![Build Status](https://travis-ci.org/sansible/php.svg?branch=develop)\n\n* [ansible.cfg](#ansible-cfg)\n* [Dependencies](#dependencies)\n* [Tags](#tags)\n* [Examples](#examples)\n\nThis is a role to install PHP with CLI and FPM support.\n\nThis playbook allows you to create isolated per application user FPM services.\nThis comes with some limitations:\n* One FPM service for one application (OS) user\n* One application root directory\n* One php.ini per application (OS) user\n* You have to provide control handlers for the user specific FPM service.\n\n\n## Dependencies\n\nNo dependencies\n\n\n## Tags\n\nThis role uses one tag: **build**\n\n* `build` - Installs PHP.\n\n\n## Arguments\n\nSee [defaults/main.yml](defaults/main.yml)\n\n~\n\n## Testing\n\n### Test all scenarios\n\n`make test`\nNote: The test container/s will NOT be left running, so for troubleshooting you may want to specify the scenario as per option below\n\n### Test a single, specified scenario\n\n`SCENARIO=\u003cyour_scenario\u003e make test`\nNote: The test container/s WILL be left running. They can be removed with `make destroy` or `make clean`.\n\n## Examples\n\nTo simply add PHP7.3 to your box.\n\n```YAML\n- name: My Awesome Playbook\n  hosts: sandbox\n\n  pre_tasks:\n    - name: Update apt\n      become: yes\n      apt:\n        cache_valid_time: 1800\n        update_cache: yes\n      tags:\n        - build\n\n  roles:\n    - role: sansible.php\n```\n\nInstall a different version of PHP to your box.\n\n```YAML\n- name: My Awesome Playbook\n  hosts: sandbox\n\n  pre_tasks:\n    - name: Update apt\n      become: yes\n      apt:\n        cache_valid_time: 1800\n        update_cache: yes\n      tags:\n        - build\n\n  roles:\n    - role: sansible.php\n      sansible_php_version: php7.2\n```\n\n\nIf you want to install some extra PHP packages, simply add it to `sansible_php_extras` list.\n\n```YAML\n- name: My Awesome Playbook\n  hosts: sandbox\n\n  pre_tasks:\n    - name: Update apt\n      become: yes\n      apt:\n        cache_valid_time: 1800\n        update_cache: yes\n      tags:\n        - build\n\n  roles:\n    - role: sansible.php\n      sansible_php_extras:\n        - php5-xdebug\n```\n\nIf you want to install PHP with a custom FPM worker.\n\n```YAML\n- name: My Awesome Playbook\n  hosts: sandbox\n\n  pre_tasks:\n    - name: Update apt\n      become: yes\n      apt:\n        cache_valid_time: 1800\n        update_cache: yes\n      tags:\n        - build\n\n  roles:\n    - role: sansible.php\n      sansible_php_fpm_description: my awesome application\n      sansible_php_fpm_chroot: /home/my_awesome_application/code/public\n      sansible_php_fpm_group: awesome_application\n      sansible_php_fpm_user: awesome_application\n```\n\nIf you want complete control over installed packages (ie. to preserve exact versions):\n\n```YAML\n- name: My Awesome Playbook\n  hosts: sandbox\n\n  pre_tasks:\n    - name: Update apt\n      become: yes\n      apt:\n        cache_valid_time: 1800\n        update_cache: yes\n      tags:\n        - build\n\n  roles:\n    - role: sansible.php\n      sansible_php_install_base_packages: no\n      sansible_php_modules:\n        - php7.3=7.0.32*\n        - php7.3-common=7.0.32*\n        - php7.3-fpm=7.0.32*\n        - php7.3-cli=7.0.32*\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsansible%2Fphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsansible%2Fphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsansible%2Fphp/lists"}