|
| 1 | +--- |
| 2 | +argument_specs: |
| 3 | + main: |
| 4 | + short_description: Main entry point for the PHP role |
| 5 | + description: |
| 6 | + - Default variables that begin with `ansible_local` are populated |
| 7 | + using the PHP fact script (files/php.fact.py). |
| 8 | + - This scripts detects many PHP-related variables automatically |
| 9 | + depending on the system (e.g. PHP version, PHP-FPM service name, |
| 10 | + configuration, directories). |
| 11 | + - The fact script is copied to the target machine at the beginning |
| 12 | + of the role execution, even in `check_mode`. |
| 13 | + - Apart from `php.version` (on a Debian-based system), you probably |
| 14 | + shouldn't change the variables starting with `ansible_local`, |
| 15 | + unless you know what you're doing. |
| 16 | + options: |
| 17 | + php: |
| 18 | + type: "dict" |
| 19 | + required: true |
| 20 | + options: |
| 21 | + repository: |
| 22 | + type: "dict" |
| 23 | + required: true |
| 24 | + description: |
| 25 | + - Configuration options for an optional 3rd party APT repository used to install |
| 26 | + alternative PHP versions (only applies for Debian-based systems) |
| 27 | + options: |
| 28 | + apt: |
| 29 | + type: "dict" |
| 30 | + required: true |
| 31 | + options: |
| 32 | + enabled: |
| 33 | + type: "bool" |
| 34 | + default: false |
| 35 | + description: |
| 36 | + - Whether the 3rd party APT repository should be installed and used |
| 37 | + key_url: |
| 38 | + type: "str" |
| 39 | + required: true |
| 40 | + description: |
| 41 | + - URL for the GPG key used to signed the APT repository |
| 42 | + repository: |
| 43 | + type: "str" |
| 44 | + required: true |
| 45 | + description: |
| 46 | + - URL for the APT repository |
| 47 | + version: |
| 48 | + type: str |
| 49 | + default: "{{ ansible_local.php.version }}" |
| 50 | + description: |
| 51 | + - PHP version to be installed (in case of Debian-based systems) and configured |
| 52 | + on the target machine. |
| 53 | + - On FreeBSD Proserver-based systems, PHP is already pre-installed. The PHP version |
| 54 | + depends on the system Blueprint and is extracted automatically from the output |
| 55 | + of `php -v`. Hence, setting this variable is not required. |
| 56 | + - On Debian-based systems, this variable defaults to the newest possible version that |
| 57 | + can be installed using the APT package manager. Provided you've enabled the 3rd party |
| 58 | + APT repository using `php.repository.apt.enabled`, you can set this variable to the |
| 59 | + desired version of PHP, as long as it's actually available in the repositories. |
| 60 | + This can be checked by using `apt search --names-only php`. |
| 61 | + prefix: |
| 62 | + type: dict |
| 63 | + default: "{{ ansible_local.php.prefix }}" |
| 64 | + description: |
| 65 | + - Directories for PHP configuration files (e.g. php.ini). |
| 66 | + - "Defaults to `config: \"/etc/php/{{ php.version }}/cli\"` on Linux |
| 67 | + and `config: \"/usr/local/etc\"` on FreeBSD." |
| 68 | + - Most of the time, you probably don't need to change this variable. |
| 69 | + php.ini: |
| 70 | + type: dict |
| 71 | + default: {} |
| 72 | + description: |
| 73 | + - Defines config options to be written into php.ini. |
| 74 | + - "The options are defined as key-value pairs in a YAML dictionary, |
| 75 | + e.g. `memory_limit: 2G` or `upload_max_filesize: 500M`" |
| 76 | + fpm: |
| 77 | + type: dict |
| 78 | + required: true |
| 79 | + description: |
| 80 | + - PHP-FPM configuration |
| 81 | + options: |
| 82 | + service: |
| 83 | + type: str |
| 84 | + default: "{{ ansible_local.php.fpm.service }}" |
| 85 | + description: |
| 86 | + - PHP-FPM service name |
| 87 | + prefix: |
| 88 | + type: str |
| 89 | + default: "{{ ansible_local.php.fpm.prefix }}" |
| 90 | + description: |
| 91 | + - Path to PHP-FPM configuration files. |
| 92 | + - Contains "config" and "pool_config" parameters, |
| 93 | + which default to `/usr/local/etc and /usr/local/etc/php-fpm.d` on |
| 94 | + FreeBSD, and `/etc/php/{{ php.version }}/fpm` and |
| 95 | + `/etc/php/{{ php.version }}/fpm/pool.d` on Linux respectively. |
| 96 | + pools: |
| 97 | + type: dict |
| 98 | + default: |
| 99 | + www: |
| 100 | + user: proserver |
| 101 | + group: proserver |
| 102 | + listen.owner: proserver |
| 103 | + listen.group: "{{ ansible_local.php.fpm.pools.www['listen.group'] }}" |
| 104 | + listen: "{{ ansible_local.php.fpm.pools.www.listen }}" |
| 105 | + description: |
| 106 | + - Defines PHP-FPM pools. |
| 107 | + - By default, only `www` pool is defined which runs |
| 108 | + under user `proserver:proserver` |
| 109 | + phpfpmtop: |
| 110 | + type: dict |
| 111 | + description: |
| 112 | + - Options for phpfpmtop, a performance monitor |
| 113 | + for PHP-FPM. |
| 114 | + options: |
| 115 | + release: |
| 116 | + type: dict |
| 117 | + options: |
| 118 | + url: |
| 119 | + type: str |
| 120 | + description: |
| 121 | + - URL to the phpfpmtop binary. |
| 122 | + checksum: |
| 123 | + type: str |
| 124 | + description: |
| 125 | + - SHA256 checksum of the phpfpmtop binary. |
| 126 | + install_extensions: |
| 127 | + type: dict |
| 128 | + default: {} |
| 129 | + description: |
| 130 | + - "Defines PHP extensions to be installed on the target machine |
| 131 | + in the `{'extension_name': true}` format, |
| 132 | + e.g. `{'pdo-mysql': true, 'mbstring': true}`." |
| 133 | + - Only applies to Debian-based targets. |
| 134 | + install_composer: |
| 135 | + type: bool |
| 136 | + default: false |
| 137 | + description: |
| 138 | + - Whether to install [Composer](https://getcomposer.org) on |
| 139 | + the target machine. |
| 140 | + - Only applies to Debian-based targets. |
0 commit comments