{"id":16780241,"url":"https://github.com/hanxhx/ansible-php","last_synced_at":"2025-09-18T00:19:51.396Z","repository":{"id":35294777,"uuid":"39555910","full_name":"HanXHX/ansible-php","owner":"HanXHX","description":"PHP Ansible role for Debian","archived":false,"fork":false,"pushed_at":"2025-06-02T11:03:58.000Z","size":172,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T13:54:35.116Z","etag":null,"topics":["ansible","ansible-role","apc","cli","debian","opcache","php-fpm","playbook","xdebug"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HanXHX.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-07-23T08:41:27.000Z","updated_at":"2025-06-02T11:03:05.000Z","dependencies_parsed_at":"2025-04-10T21:15:23.039Z","dependency_job_id":null,"html_url":"https://github.com/HanXHX/ansible-php","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/HanXHX/ansible-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HanXHX","download_url":"https://codeload.github.com/HanXHX/ansible-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanXHX%2Fansible-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231433,"owners_count":25245585,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","apc","cli","debian","opcache","php-fpm","playbook","xdebug"],"created_at":"2024-10-13T07:34:28.736Z","updated_at":"2025-09-18T00:19:45.892Z","avatar_url":"https://github.com/HanXHX.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible PHP (+FPM) role for Debian / Ubuntu\n===========================================\n\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-hanxhx.php-blue.svg)](https://galaxy.ansible.com/hanxhx.php) ![GitHub Workflow Status (master)](https://img.shields.io/github/actions/workflow/status/hanxhx/ansible-php/molecule.yml?branch=master)\n\nInstall PHP on Debian / Ubuntu. Manage PHP-FPM, APCu, Opcache and Xdebug.\n\nManaged OS / Versions\n---------------------\n\nOn all Debian versions, you can install all PHP versions (from PHP 5.6 to latest version) by using [Sury's APT repository](https://deb.sury.org/).\n\nLinks:\n- [Sury](https://deb.sury.org/)\n\nRequirements\n------------\n\n- Ansible \u003e= 2.11\n- Collections: [community.general](https://galaxy.ansible.com/community/general)\n- If you need PHP-FPM, you must install a webserver with FastCGI support. You can use my [nginx role](https://github.com/HanXHX/ansible-nginx).\n\nRole Variables\n--------------\n\nYou should look at [default vars](defaults/main.yml).\n\n### Writable vars\n\n- `php_version`: 7.3, 7.4... depending on OS\n- `php_install_fpm`: boolean, install and manage php-fpm (default is true)\n- `php_install_xdebug`: boolean, install [Xdebug](http://xdebug.org)\n- `php_extra_packages`: additional php packages to install (default is an empty list).\n\n#### php.ini\n\n- `php_ini`: global configuration shared beween FPM/CLI\n- `php_ini_fpm`: manage FPM php.ini (php-fpm)\n- `php_ini_cli`: manage CLI php.ini (php-fpm)\n\nNote:\n\n- If you want exactly same configuration for CLI/FPM. You can put all your data in `php_ini`.\n- Put specific configuration in `php_ini_fpm`/`php_ini_cli`.\n- You can override with `php_ini_fpm`/`php_ini_cli`, but it breaks idempotence.\n\n#### OpCache settings\n\nSee [Opcache doc](https://secure.php.net/manual/en/opcache.configuration.php)\n\n- `php_opcache_enable`\n- `php_opcache_enable_cli`\n- `php_opcache_memory_consumption`\n- `php_opcache_interned_strings_buffer`\n- `php_opcache_max_accelerated_files`\n- `php_opcache_max_wasted_percentage`\n- `php_opcache_validate_timestamps`\n- `php_opcache_revalidate_freq`\n- `php_opcache_max_file_size`\n\n\n#### APC/APCu settings\n\nSee [apc doc](https://secure.php.net/manual/en/apc.configuration.php)\n\n- `php_apc_enable`\n- `php_apc_enable_cli`\n- `php_apc_shm_size`\n- `php_apc_num_files_hint`\n- `php_apc_user_entries_hint`\n- `php_apc_user_ttl`\n- `php_apc_ttl`\n- `php_apc_file_update_protection`\n- `php_apc_slam_defense`\n- `php_apc_stat_ctime`\n\n# Xdebug settings\n\nSee [Xdebug doc](http://xdebug.org/docs/all_settings)\n\n- `php_xdebug_auto_trace`\n- `php_xdebug_cli_color`\n- `php_xdebug_collect_assignments`\n- `php_xdebug_collect_includes`\n- `php_xdebug_collect_params`\n- `php_xdebug_collect_return`\n- `php_xdebug_collect_vars`\n- `php_xdebug_coverage_enable`\n- `php_xdebug_default_enable`\n- `php_xdebug_dump_globals`\n- `php_xdebug_dump_once`\n- `php_xdebug_dump_undefined`\n- `php_xdebug_extended_info`\n- `php_xdebug_file_link_format`\n- `php_xdebug_force_display_errors`\n- `php_xdebug_force_error_reporting`\n- `php_xdebug_halt_level`\n- `php_xdebug_idekey`\n- `php_xdebug_manual_url`\n- `php_xdebug_max_nesting_level`\n- `php_xdebug_overload_var_dump`\n- `php_xdebug_profiler_append`\n- `php_xdebug_profiler_enable`\n- `php_xdebug_profiler_enable_trigger`\n- `php_xdebug_profiler_enable_trigger_value`\n- `php_xdebug_profiler_output_dir`\n- `php_xdebug_profiler_output_name`\n- `php_xdebug_remote_autostart`\n- `php_xdebug_remote_connect_back`\n- `php_xdebug_remote_cookie_expire_time`\n- `php_xdebug_remote_enable`\n- `php_xdebug_remote_handler`\n- `php_xdebug_remote_host`\n- `php_xdebug_remote_log`\n- `php_xdebug_remote_mode`\n- `php_xdebug_remote_port`\n- `php_xdebug_scream`\n- `php_xdebug_show_exception_trace`\n- `php_xdebug_show_local_vars`\n- `php_xdebug_show_mem_delta`\n- `php_xdebug_trace_enable_trigger`\n- `php_xdebug_trace_enable_trigger_value`\n- `php_xdebug_trace_format`\n- `php_xdebug_trace_options`\n- `php_xdebug_trace_output_dir`\n- `php_xdebug_trace_output_name`\n- `php_xdebug_var_display_max_children`\n- `php_xdebug_var_display_max_data`\n- `php_xdebug_var_display_max_depth`\n\n### Read only vars\n\n- `php_packages`: minimal package list to install\n- `php_extension_dir.stdout`: get php extension dir (from task)\n- `php_version.stdout`: get php version (from task)\n\nDependencies\n------------\n\nNone.\n\nExample Playbook\n----------------\n\n### Simple Playbook\n\n```yaml\n- hosts: servers\n  roles:\n     - { role: HanXHX.php }\n```\n\n### Debian Bullseye with PHP 8.0 CLI (no FPM)\n\n```yaml\n- hosts: servers\n  roles:\n     - { role: HanXHX.sury }\n     - { role: HanXHX.php, php_version: '8.0', php_install_fpm: false }\n```\n\nLicense\n-------\n\nGPLv2\n\nDonation\n--------\n\nIf this code helped you, or if you’ve used them for your projects, feel free to buy me some :beers:\n\n- Bitcoin: `1BQwhBeszzWbUTyK4aUyq3SRg7rBSHcEQn`\n- Ethereum: `0x63abe6b2648fd892816d87a31e3d9d4365a737b5`\n- Litecoin: `LeNDw34zQLX84VvhCGADNvHMEgb5QyFXyD`\n- Monero: `45wbf7VdQAZS5EWUrPhen7Wo4hy7Pa7c7ZBdaWQSRowtd3CZ5vpVw5nTPphTuqVQrnYZC72FXDYyfP31uJmfSQ6qRXFy3bQ`\n\nNo cryptocurrency? :star: the project is also a way of saying thank you! :sunglasses:\n\nAuthor Information\n------------------\n\n- Twitter: [@hanxhx_](https://twitter.com/hanxhx_)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanxhx%2Fansible-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanxhx%2Fansible-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanxhx%2Fansible-php/lists"}