roles/php-fpm: Updates for Debian 9 (stretch)

Debian 9 is still in beta and doesn't have nginx.org builds yet, so
we need to use the nginx package in Debian's repositories, and that
required a bit of a different configuration.

After official nginx.org builds are released we can revert this.
This commit is contained in:
Alan Orth 2017-01-30 15:11:39 +02:00
parent 1fef5c9b5a
commit 8c3a8fc26a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 14 additions and 2 deletions

View File

@ -1,11 +1,13 @@
--- ---
# Note: Debian 9's php-fpm config is identical to Ubuntu 16.04's, so for now we
# can capitalize on that and use the same tasks.
- include: Debian.yml - include: Debian.yml
when: ansible_distribution == 'Debian' when: ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '<')
tags: php-fpm tags: php-fpm
- include: Ubuntu.yml - include: Ubuntu.yml
when: ansible_distribution == 'Ubuntu' when: ansible_distribution == 'Ubuntu' or (ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '=='))
tags: php-fpm tags: php-fpm
# vim: set ts=2 sw=2: # vim: set ts=2 sw=2:

View File

@ -22,8 +22,13 @@
; Unix user/group of processes ; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group ; Note: The user is mandatory. If the group is not set, the default user's group
; will be used. ; will be used.
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '==') %}
user = www-data
group = www-data
{% else %}
user = nginx user = nginx
group = nginx group = nginx
{% endif %}
; The address on which to accept FastCGI requests. ; The address on which to accept FastCGI requests.
; Valid syntaxes are: ; Valid syntaxes are:
@ -44,8 +49,13 @@ listen = /run/php/php7.0-fpm-{{ domain_name }}.sock
; BSD-derived systems allow connections regardless of permissions. ; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user ; Default Values: user and group are set as the running user
; mode is set to 0660 ; mode is set to 0660
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '==') %}
listen.owner = www-data
listen.group = www-data
{% else %}
listen.owner = nginx listen.owner = nginx
listen.group = nginx listen.group = nginx
{% endif %}
;listen.mode = 0660 ;listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using ; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names. ; these options, value is a comma separated list of user/group names.