mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2024-11-24 12:06:02 +01:00
Merge pull request #128 from mgarstecki/fix-fpm-centos
Fix #120: Introduce variables for FPM user and group.
This commit is contained in:
commit
ef1fcfff82
@ -9,6 +9,16 @@
|
||||
php_fpm_pool_conf_path: "{{ __php_fpm_pool_conf_path }}"
|
||||
when: php_fpm_pool_conf_path is not defined
|
||||
|
||||
- name: Define php_fpm_pool_user.
|
||||
set_fact:
|
||||
php_fpm_pool_user: "{{ __php_fpm_pool_user }}"
|
||||
when: php_fpm_pool_user is not defined
|
||||
|
||||
- name: Define php_fpm_pool_group.
|
||||
set_fact:
|
||||
php_fpm_pool_group: "{{ __php_fpm_pool_group }}"
|
||||
when: php_fpm_pool_group is not defined
|
||||
|
||||
- name: Stat php_fpm_pool_conf_path
|
||||
stat:
|
||||
path: "{{ php_fpm_pool_conf_path | dirname }}"
|
||||
@ -24,8 +34,8 @@
|
||||
when: php_fpm_pool_conf_path_dir_stat.stat.islnk is not defined
|
||||
|
||||
- name: Ensure the default pool exists.
|
||||
copy:
|
||||
src: www.conf
|
||||
template:
|
||||
src: www.conf.j2
|
||||
dest: "{{ php_fpm_pool_conf_path }}"
|
||||
owner: root
|
||||
group: root
|
||||
|
@ -1,8 +1,8 @@
|
||||
[www]
|
||||
listen = 127.0.0.1:9000
|
||||
listen.allowed_clients = 127.0.0.1
|
||||
user = www-data
|
||||
group = www-data
|
||||
user = {{ php_fpm_pool_user }}
|
||||
group = {{ php_fpm_pool_group }}
|
||||
|
||||
pm = dynamic
|
||||
pm.max_children = 50
|
@ -32,3 +32,6 @@ __php_opcache_conf_filename: 05-opcache.ini
|
||||
__php_fpm_daemon: php7.0-fpm
|
||||
__php_fpm_conf_path: "/etc/php/7.0/fpm"
|
||||
__php_fpm_pool_conf_path: "{{ __php_fpm_conf_path }}/pool.d/www.conf"
|
||||
|
||||
__php_fpm_pool_user: www-data
|
||||
__php_fpm_pool_group: www-data
|
||||
|
@ -28,3 +28,6 @@ __php_opcache_conf_filename: 10-opcache.ini
|
||||
__php_fpm_daemon: php-fpm
|
||||
__php_fpm_conf_path: "/etc/fpm"
|
||||
__php_fpm_pool_conf_path: "/etc/php-fpm.d/www.conf"
|
||||
|
||||
__php_fpm_pool_user: apache
|
||||
__php_fpm_pool_group: apache
|
||||
|
Loading…
Reference in New Issue
Block a user