role is functionnal, we can create more pools
This commit is contained in:
@@ -15,6 +15,14 @@
|
||||
option: enabled
|
||||
value: 1
|
||||
|
||||
- name: create socket directory if needed
|
||||
file:
|
||||
path: "{{ php_listen_url|dirname }}"
|
||||
state: directory
|
||||
owner: "{{ php_fpm_pool_user }}"
|
||||
when: php_listen_url[0] == '/'
|
||||
|
||||
|
||||
- name: install php-fpm
|
||||
yum:
|
||||
name:
|
||||
@@ -26,18 +34,18 @@
|
||||
name: "{{ php_packages }}"
|
||||
state: present
|
||||
|
||||
- name: disable default pool
|
||||
copy:
|
||||
content: ""
|
||||
dest: "/etc/opt/remi/php{{ php_version }}/php-fpm.d/www.conf"
|
||||
notify: restart php-fpm
|
||||
|
||||
- name: configure php-fpm pool 2
|
||||
template:
|
||||
src: www.conf
|
||||
dest: /etc/opt/remi/php{{ php_version }}/php-fpm.d/www_{{ php_version }}.conf
|
||||
dest: /etc/opt/remi/php{{ php_version }}/php-fpm.d/{{ php_poolname }}_{{ php_version }}.conf
|
||||
notify: restart php-fpm
|
||||
|
||||
- name: create log symlink
|
||||
file:
|
||||
src: /var/opt/remi/php{{ php_version }}/log/php-fpm
|
||||
dest: /var/log/php-fpm
|
||||
state: link
|
||||
|
||||
- name: start and enable service
|
||||
service:
|
||||
name: php{{php_version}}-php-fpm
|
||||
|
||||
Reference in New Issue
Block a user