From ef0ff6957523dc3638dfbd43408c537dcf879c27 Mon Sep 17 00:00:00 2001 From: Chris Croome <chris@webarchitects.co.uk> Date: Tue, 7 Mar 2023 11:48:43 +0000 Subject: [PATCH] Alternatives config remove and README updated --- README.md | 18 +- defaults/backup.yml | 1136 --------------------------------------- defaults/main.yml | 41 -- meta/argument_specs.yml | 4 - tasks/checks.yml | 34 ++ tasks/main.yml | 21 - 6 files changed, 47 insertions(+), 1207 deletions(-) delete mode 100644 defaults/backup.yml diff --git a/README.md b/README.md index 1a740fa..4932142 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Webarchitects PHP Ansible role -This role isn't setup to generate multiple `pool.d` config files, but the [users role is](https://git.coop/webarch/users/blob/master/templates/phpfpm_chroot_user.conf.j2). +This Ansible role is designed to install and configure PHP on Debian, by default it installes packages from [deb.sury.org](https://deb.sury.org/), but it can also be used to install and cpnfigure only PHP packages from Debian. -<!-- BEGIN_ANSIBLE_DOCS --> +## Role variables -<!-- END_ANSIBLE_DOCS --> +See the [defaults/main.yml](defaults/main.yml) file for the default variables, the [vars/main.yml](vars/main.yml) file for the preset variables and the [meta/argument_specs.yml](meta/argument_specs.yml) file for the variable specification. ## Help @@ -14,8 +14,16 @@ Reinstall a package and the configuration files when they have been deleted (see UCF_FORCE_CONFFMISS=1 apt-get -o Dpkg::Options::="–force-confmiss" install "php8.1-fpm" ``` +## Repository -## Repo History +The primary URL of this repo is [`https://git.coop/webarch/php`](https://git.coop/webarch/php) however it is also [mirrored to GitHub](https://github.com/webarch-coop/ansible-role-php) and [available via Ansible Galaxy](https://galaxy.ansible.com/chriscroome/php). -In June 2021 this role was renamed from `phpfpm` to `php` and the URL of the git repo and all the variable names and tags have been updated to match. +If you use this role please use a tagged release, see [the release notes](https://git.coop/webarch/php/-/releases). +In June 2021 this role was renamed from `phpfpm` to `php` and the URL of the git repo was updated to match, at the same time the git repo that was at `https://git.coop/webarch/php` was archived to [git.coop/webarch/php7](https://git.coop/webarch/php7). + +## Copyright + +Copyright 2019-2023 Chris Croome, <[chris@webarchitects.co.uk](mailto:chris@webarchitects.co.uk)>. + +This role is released under [the same terms as Ansible itself](https://github.com/ansible/ansible/blob/devel/COPYING), the [GNU GPLv3](LICENSE). diff --git a/defaults/backup.yml b/defaults/backup.yml deleted file mode 100644 index 3774afb..0000000 --- a/defaults/backup.yml +++ /dev/null @@ -1,1136 +0,0 @@ ---- -php_versions_available: - - "5.6" - - "7.0" - - "7.1" - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - "8.1" - - "8.2 " -php_versions_present: - - "7.4" - - "8.0" - - "8.1" - - -# aptitude -q=99 search '~i ?name("php[0-9].[0-9]")' -F '%p' -php_pkg: - - php7.4-apcu - - php7.4-apcu-bc - - php7.4-bcmath - - php7.4-bz2 - - php7.4-cli - - php7.4-common - - php7.4-curl - - php7.4-fpm - - php7.4-gd - - php7.4-geoip - - php7.4-gmp - - php7.4-imap - - php7.4-intl - - php7.4-json - - php7.4-ldap - - php7.4-mbstring - - php7.4-mysql - - php7.4-opcache - - php7.4-readline - - php7.4-sqlite3 - - php7.4-soap - - php7.4-uploadprogress - - php7.4-xml - - php7.4-xmlrpc - - php7.4-xsl - - php7.4-zip - - php8.0-apcu - - php8.0-bcmath - - php8.0-bz2 - - php8.0-cli - - php8.0-common - - php8.0-curl - - php8.0-fpm - - php8.0-gd - - php8.0-gmp - - php8.0-imap - - php8.0-intl - - php8.0-ldap - - php8.0-opcache - - php8.0-readline - - php8.0-sqlite3 - - php8.0-uploadprogress - - php8.0-xml - - php8.0-xsl - - php8.1-apcu - - php8.1-bcmath - - php8.1-bz2 - - php8.1-cli - - php8.1-common - - php8.1-curl - - php8.1-fpm - - php8.1-gd - - php8.1-gmp - - php8.1-imap - - php8.1-intl - - php8.1-ldap - - php8.1-mbstring - - php8.1-opcache - - php8.1-readline - - php8.1-sqlite3 - - php8.1-uploadprogress - - php8.1-xml - - php8.1-xsl -php_mod: - state: present - versions: - "7.4": - state: present - # phpquery -v 7.4 -M | sort | sed 's/^/ - /' - mods_available: - - apcu - - apcu_bc - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - geoip - - gettext - - gmp - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - mysqlnd - - opcache - - pdo - - pdo_mysql - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - soap - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip - sapis: - cli: - state: present - mods_enabled: - - apcu - - apcu_bc - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - geoip - - gettext - - gmp - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - mysqlnd - - opcache - - pdo - - pdo_mysql - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - soap - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip - fpm: - state: present - mods_enabled: - - apcu - - apcu_bc - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - geoip - - gettext - - gmp - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - mysqlnd - - opcache - - pdo - - pdo_mysql - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - soap - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip - "8.0": - state: present - # phpquery -v 8.0 -M | sort | sed 's/^/ - /' - mods_available: - - apcu - - apcu_bc - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - gettext - - gmp - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - mysqlnd - - opcache - - pdo - - pdo_mysql - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - soap - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip - sapis: - cli: - state: present - mods_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - gettext - - gmp - - iconv - - imap - - intl - - ldap - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - fpm: - state: present - mods_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - gettext - - gmp - - iconv - - imap - - intl - - ldap - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - "8.1": - state: present - # phpquery -v 8.1 -M | sort | sed 's/^/ - /' - mods_available: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - gettext - - iconv - - imap - - intl - - ldap - - mbstring - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - sapis: - cli: - state: present - mods_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gettext - - gmp - - iconv - - imap - - intl - - ldap - - mbstring - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - fpm: - state: present - mods_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gettext - - gmp - - iconv - - imap - - intl - - ldap - - mbstring - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl -php_cfg: - versions: - "7.4": - sapis: - fpm: - config: - apc: - "apc.enabled": 1 - "apc.shm_size": "32M" - Date: - "date.timezone": "Europe/London" - MySQLi: - "mysqli.allow_local_infile": "On" - opcache: - "opcache.enable": "0" - "opcache.interned_strings_buffer": "64" - "opcache.max_accelerated_files": "100000" - "opcache.memory_consumption": "1024" - "opcache.revalidate_freq": "2" - "opcache.use_cwd": "1" - "opcache.validate_permission": "1" - "opcache.validate_root": "1" - "opcache.validate_timestamps": "1" - PHP: - allow_url_include: "Off" - default_socket_timeout: "600" - disable_functions: "pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare" - max_execution_time: "600" - max_file_uploads: "60" - max_input_nesting_level: "512" - max_input_time: "600" - max_input_vars: "100000" - memory_limit: "512M" - output_buffering: "4096" - post_max_size: "512M" - short_open_tag: "Off" - upload_max_filesize: "512M" - Session: - "session.save_path": "${TMPDIR}" - "8.0": - sapis: - fpm: - config: - apc: - "apc.enabled": 1 - "apc.shm_size": "32M" - Date: - "date.timezone": "Europe/London" - MySQLi: - "mysqli.allow_local_infile": "On" - opcache: - "opcache.enable": "0" - "opcache.interned_strings_buffer": "64" - "opcache.max_accelerated_files": "100000" - "opcache.memory_consumption": "1024" - "opcache.revalidate_freq": "2" - "opcache.use_cwd": "1" - "opcache.validate_permission": "1" - "opcache.validate_root": "1" - "opcache.validate_timestamps": "1" - PHP: - allow_url_include: "Off" - default_socket_timeout: "600" - disable_functions: "pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare" - max_execution_time: "600" - max_file_uploads: "60" - max_input_nesting_level: "512" - max_input_time: "600" - max_input_vars: "100000" - memory_limit: "512M" - output_buffering: "4096" - post_max_size: "512M" - short_open_tag: "Off" - upload_max_filesize: "512M" - Session: - "session.save_path": "${TMPDIR}" - "8.1": - sapis: - fpm: - config: - apc: - "apc.enabled": 1 - "apc.shm_size": "32M" - Date: - "date.timezone": "Europe/London" - MySQLi: - "mysqli.allow_local_infile": "On" - opcache: - "opcache.enable": "0" - "opcache.interned_strings_buffer": "64" - "opcache.max_accelerated_files": "100000" - "opcache.memory_consumption": "1024" - "opcache.revalidate_freq": "2" - "opcache.use_cwd": "1" - "opcache.validate_permission": "1" - "opcache.validate_root": "1" - "opcache.validate_timestamps": "1" - PHP: - allow_url_include: "Off" - default_socket_timeout: "600" - disable_functions: "pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare" - max_execution_time: "600" - max_file_uploads: "60" - max_input_nesting_level: "512" - max_input_time: "600" - max_input_vars: "100000" - memory_limit: "512M" - output_buffering: "4096" - post_max_size: "512M" - short_open_tag: "Off" - upload_max_filesize: "512M" - Session: - "session.save_path": "${TMPDIR}" -# -php_sury: true -php_aptitude: /usr/bin/aptitude -php_dpkg: /usr/bin/dpkg -php_gpg: /usr/bin/gpg -php_phpquery: /usr/sbin/phpquery -php_remove_legacy: false -php_alternatives: - cli: - '8.1': - priority: 81 - '8.0': - priority: 74 - '7.4': - priority: 74 - fpm: - '8.1': - priority: 81 - '8.0': - priority: 74 - '7.4': - priority: 74 -php_versions: - '8.1': - state: present - packages_absent: - - libapache2-mod-php8.1 - - php8.1-phpdbg - packages_present: - - php8.1-apcu - - php8.1-bcmath - - php8.1-bz2 - - php8.1-cli - - php8.1-common - - php8.1-curl - - php8.1-fpm - - php8.1-imap - - php8.1-intl - - php8.1-ldap - - php8.1-mbstring - - php8.1-readline - - php8.1-sqlite3 - - php8.1-uploadprogress - - php8.1-xml - - php8.1-xsl - sapis: - apache2: - state: absent - cli: - state: present - modules_disabled: [] - modules_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gettext - - iconv - - imap - - intl - - ldap - - mbstring - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - fpm: - state: present - modules_disabled: [] - modules_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gettext - - iconv - - imap - - intl - - ldap - - mbstring - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - phpdbg: - state: absent - '8.0': - state: present - packages_absent: - - libapache2-mod-php8.0 - - php8.0-phpdbg - packages_present: - - php8.0-apcu - - php8.0-bcmath - - php8.0-bz2 - - php8.0-cli - - php8.0-common - - php8.0-curl - - php8.0-fpm - - php8.0-imap - - php8.0-intl - - php8.0-ldap - - php8.0-opcache - - php8.0-readline - - php8.0-sqlite3 - - php8.0-uploadprogress - - php8.0-xml - - php8.0-xsl - sapis: - apache2: - state: absent - cli: - state: present - modules_disabled: [] - modules_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gettext - - iconv - - imap - - intl - - ldap - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - fpm: - state: present - modules_disabled: [] - modules_enabled: - - apcu - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gettext - - iconv - - imap - - intl - - ldap - - opcache - - pdo - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlwriter - - xsl - phpdbg: - state: absent - '7.4': - state: present - packages_absent: - - libapache2-mod-php7.4 - - php7.4-phpdbg - packages_present: - - php7.4-apcu - - php7.4-apcu-bc - - php7.4-bcmath - - php7.4-bz2 - - php7.4-cli - - php7.4-common - - php7.4-curl - - php7.4-fpm - - php7.4-geoip - - php7.4-imap - - php7.4-intl - - php7.4-json - - php7.4-ldap - - php7.4-opcache - - php7.4-readline - - php7.4-sqlite3 - - php7.4-uploadprogress - - php7.4-xml - - php7.4-xsl - sapis: - apache2: - state: absent - cli: - state: present - modules_disabled: [] - modules_enabled: - - apcu - - apcu_bc - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - geoip - - gettext - - gmp - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - mysqlnd - - opcache - - pdo - - pdo_mysql - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - soap - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip - fpm: - state: present - modules_disabled: [] - modules_enabled: - - apcu - - apcu_bc - - bcmath - - bz2 - - calendar - - ctype - - curl - - dom - - exif - - ffi - - fileinfo - - ftp - - gd - - geoip - - gettext - - gmp - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - mysqlnd - - opcache - - pdo - - pdo_mysql - - pdo_sqlite - - phar - - posix - - readline - - shmop - - simplexml - - soap - - sockets - - sqlite3 - - sysvmsg - - sysvsem - - sysvshm - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip - phpdbg: - state: absent - '7.3': - state: absent - '7.2': - state: absent - '7.1': - state: absent - '7.0': - state: absent - '5.6': - state: absent -php_packages: - - php-curl - - php-date - - php-gd - - php-gmp - - php-json - - php-imagick - - php-intl - - php-mbstring - - php-mysql - - php-pear - - php-soap - - php-xmlrpc - - php-zip - - composer -php_versioned_packages: - - apcu - - bcmath - - bz2 - - cli - - ctype - - curl - - dom - - exif - - fileinfo - - gd - # - geoip - - iconv - - imagick - - imap - - intl - - json - - ldap - - mbstring - - mysqli - - opcache - - pdo - - posix - - simplexml - - sqlite3 - - readline - - tokenizer - - uploadprogress - - xml - - xmlreader - - xmlrpc - - xmlwriter - - xsl - - zip -# NOTE pool.d files cannot enable any functions that are listed as disabled -# here. -# Set this to an empty list prevent disabling of functions -# php_disable_functions: [] -php_disable_functions: - - chgrp - - chown - # curl_exec is used by Nextcloud, some MediaWiki extensions and the - # WordPress Piwik plugin - # - curl_exec - # curl_multi_exec is used by the MediaWiki VisualEditor - # - curl_multi_exec - - dl - - exec - # fsockopen is used by CiviCRM to send email - # - fsockopen - - passthru - - pcntl_alarm - - pcntl_fork - - pcntl_waitpid - - pcntl_wait - - pcntl_wifexited - - pcntl_wifstopped - - pcntl_wifsignaled - - pcntl_wifcontinued - - pcntl_wexitstatus - - pcntl_wtermsig - - pcntl_wstopsig - - pcntl_signal - - pcntl_signal_get_handler - - pcntl_signal_dispatch - - pcntl_get_last_error - - pcntl_strerror - - pcntl_sigprocmask - - pcntl_sigwaitinfo - - pcntl_sigtimedwait - - pcntl_exec - - pcntl_getpriority - - pcntl_setpriority - - pcntl_async_signals - - pcntl_unshare - - popen - - posix_kill - - posix_mkfifo - - posix_setpgid - - posix_setsid - - posix_setuid - # The proc_ functions are used by MediaWiki - # - proc_close - # - proc_get_status - # - proc_nice - # - proc_open - # - proc_terminate - # The shell_exec function is used by Matomo - # - shell_exec - - show_source - - socket_create - - symlink - - system - - system_exec -php_date_timezone: Europe/London -php_max_execution_time: 600 -php_default_socket_timeout: "{{ php_max_execution_time }}" -php_max_input_time: 600 -php_max_input_nesting_level: 512 -php_max_input_vars: 100000 -php_memory_limit: 512M -# Set php_output_buffering to 0 to disable output_buffering -php_output_buffering: 4096 -php_post_max_size: 512M -php_upload_max_filesize: 512M -php_max_file_uploads: 60 -php_allow_url_include: false -php_mysqli_allow_local_infile: false -php_short_open_tag: false -php_session_save_path: "${TMPDIR}" -php_apc_shm_size: 32M -php_opcache_enable: true -php_opcache_memory_consumption: 1024 -php_opcache_interned_strings_buffer: 64 -php_opcache_use_cwd: true -php_opcache_validate_timestamps: 1 -php_opcache_revalidate_freq: 2 -php_opcache_validate_permission: true -php_opcache_validate_root: true -php_opcache_max_accelerated_files: 100000 -php_www_pool_enabled: true -php_www_pool_pm: dynamic -php_www_pool_pm_max_children: 4 -php_www_pool_pm_process_idle_timeout: 10s -php_www_pool_pm_start_servers: 1 -php_www_pool_pm_min_spare_servers: 1 -php_www_pool_pm_max_spare_servers: 1 -php_www_pool_pm_max_requests: 1000 -# if this isn't set then the status is disabled -# php_www_pool_pm_status_path: /status -# if this isn't set then the ping is disabled -# php_www_pool_ping_path: /ping -phpcli_allow_local_infile: false -# Enable email to root with results of grepping for pm.max_children -php_log_grep: false -php_log: "/var/log/php{{ php_version }}-fpm.log" -... diff --git a/defaults/main.yml b/defaults/main.yml index b7db209..6f3be48 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,47 +9,6 @@ # You should have received a copy of the GNU General Public License along with the Webarchitects PHP Ansible role. If not, see <https://www.gnu.org/licenses/>. --- php: true -php_alternatives: true -php_alternatives_update: - - name: php - link: /usr/bin/php - slaves: - - name: php.1.gz - path: /usr/share/man/man1/php.1.gz - status: manual - best: /usr/bin/php8.1 - value: /usr/bin/php8.1 - alternatives: - # - alternative: /usr/bin/php7.0 - # priority: 70 - # slaves: - # - name: php.1.gz - # path: /usr/share/man/man1/php7.0.1.gz - # - alternative: /usr/bin/php7.3 - # priority: 73 - # slaves: - # - name: php.1.gz - # path: /usr/share/man/man1/php7.3.1.gz - - alternative: /usr/bin/php7.4 - priority: 74 - slaves: - - name: php.1.gz - path: /usr/share/man/man1/php7.4.1.gz - - alternative: /usr/bin/php8.0 - priority: 80 - slaves: - - name: php.1.gz - path: /usr/share/man/man1/php8.0.1.gz - - alternative: /usr/bin/php8.1 - priority: 181 - slaves: - - name: php.1.gz - path: /usr/share/man/man1/php8.1.1.gz - - alternative: /usr/bin/php8.2 - priority: 82 - slaves: - - name: php.1.gz - path: /usr/share/man/man1/php8.2.1.gz php_check_legacy_variables: true php_config: - name: PHP 8.2 configuration diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index a2aa6aa..b38580f 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -18,10 +18,6 @@ argument_specs: type: bool required: true description: Run the tasks in this role. - # php_alternatives: - # type: dict - # required: true - # description: A dictionary for the Alternatives role to set the priority of PHP versions. php_config: type: list required: false diff --git a/tasks/checks.yml b/tasks/checks.yml index 87c6c65..207c104 100644 --- a/tasks/checks.yml +++ b/tasks/checks.yml @@ -14,6 +14,40 @@ - name: Check that depreciated variables are not defined ansible.builtin.assert: that: + - phpfpm_packages is not defined + - phpfpm_disable_functions is not defined + - phpfpm_date_timezone is not defined + - phpfpm_max_execution_time is not defined + - phpfpm_max_input_time is not defined + - phpfpm_max_input_nesting_level is not defined + - phpfpm_max_input_vars is not defined + - phpfpm_memory_limit is not defined + - phpfpm_post_max_size is not defined + - phpfpm_upload_max_filesize is not defined + - phpfpm_max_file_uploads is not defined + - phpfpm_allow_url_include is not defined + - phpfpm_allow_local_infile is not defined + - phpfpm_session_save_path is not defined + - phpfpm_opcache_enable is not defined + - phpfpm_opcache_memory_consumption is not defined + - phpfpm_opcache_interned_strings_buffer is not defined + - phpfpm_opcache_use_cwd is not defined + - phpfpm_opcache_validate_timestamps is not defined + - phpfpm_opcache_revalidate_freq is not defined + - phpfpm_opcache_validate_permission is not defined + - phpfpm_opcache_validate_root is not defined + - phpfpm_opcache_max_accelerated_files is not defined + - phpfpm_www_pool_enabled is not defined + - phpfpm_www_pool_pm is not defined + - phpfpm_www_pool_pm_max_children is not defined + - phpfpm_www_pool_pm_process_idle_timeout is not defined + - phpfpm_www_pool_pm_start_servers is not defined + - phpfpm_www_pool_pm_min_spare_servers is not defined + - phpfpm_www_pool_pm_max_spare_servers is not defined + - phpfpm_www_pool_pm_max_requests is not defined + - phpcli_allow_local_infile is not defined + - phpfpm_log_grep is not defined + - phpfpm_log is not defined - php_allow_url_include is not defined - php_apc_shm_size is not defined - phpcli_allow_local_infile is not defined diff --git a/tasks/main.yml b/tasks/main.yml index f9bc49a..3efc429 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -88,27 +88,6 @@ - php_cfg - php_conf - - name: PHP alternatives - block: - - - name: Debug PHP alternatives - ansible.builtin.debug: - var: php_alternatives_update - verbosity: "{% if ansible_check_mode | bool %}1{% else %}2{% endif %}" - - - name: Include alternatives role - ansible.builtin.include_role: - name: alternatives - vars: - alternatives: true - alternatives_update: "{{ php_alternatives_update }}" - - when: - - php_alternatives | bool - - php_alternatives_update is defined - tags: - - php_alt - when: php | bool tags: - php -- GitLab