As we saw in the last section, there are a few variables defined for PHP in roles/stack-config/defaults/main.yml, and these are:
php: ip: "127.0.0.1" port: "9000" upstream: "php" ini: - { regexp: '^;date.timezone =', replace: 'date.timezone = Europe/London' } - { regexp: '^expose_php = On', replace: 'expose_php = Off' } - { regexp: '^upload_max_filesize = 2M', replace: 'upload_max_filesize = 20M' }
The first configuration task is to deploy the PHP-FPM configuration; this is what the template looks like:
; {{ ansible_managed }}[{{ wordpress_system.user }}]user = {{ wordpress_system.user }}group = {{ wordpress_system.group }}listen = {{ php.ip }}:{{ php.port }}listen.allowed_clients = {{ php.ip }}pm = dynamic