roles/php-fpm: Reload service instead of restarting
No need to bounce the service for most config changes when we can just tell the daemon to reload gracefully.
This commit is contained in:
parent
2a230ceff4
commit
51183617b8
@ -4,7 +4,7 @@
|
|||||||
service: name=php5-fpm state=restarted
|
service: name=php5-fpm state=restarted
|
||||||
|
|
||||||
# For Ubuntu 16.04
|
# For Ubuntu 16.04
|
||||||
- name: restart php7.0-fpm
|
- name: reload php7.0-fpm
|
||||||
systemd: name=php7.0-fpm state=restarted
|
systemd: name=php7.0-fpm state=reloaded
|
||||||
|
|
||||||
# vim: set ts=2 sw=2:
|
# vim: set ts=2 sw=2:
|
||||||
|
@ -17,18 +17,18 @@
|
|||||||
template: src=php7.0-pool.conf.j2 dest=/etc/php/7.0/fpm/pool.d/{{ item.domain_name }}.conf owner=root group=root mode=0644
|
template: src=php7.0-pool.conf.j2 dest=/etc/php/7.0/fpm/pool.d/{{ item.domain_name }}.conf owner=root group=root mode=0644
|
||||||
with_items: "{{ nginx_vhosts }}"
|
with_items: "{{ nginx_vhosts }}"
|
||||||
when: (item.has_wordpress is defined and item.has_wordpress == True) or (item.needs_php is defined and item.needs_php == True)
|
when: (item.has_wordpress is defined and item.has_wordpress == True) or (item.needs_php is defined and item.needs_php == True)
|
||||||
notify: restart php7.0-fpm
|
notify: reload php7.0-fpm
|
||||||
tags: php-fpm
|
tags: php-fpm
|
||||||
|
|
||||||
- name: Remove default www pool
|
- name: Remove default www pool
|
||||||
file: path=/etc/php/7.0/fpm/pool.d/www.conf state=absent
|
file: path=/etc/php/7.0/fpm/pool.d/www.conf state=absent
|
||||||
notify: restart php7.0-fpm
|
notify: reload php7.0-fpm
|
||||||
tags: php-fpm
|
tags: php-fpm
|
||||||
|
|
||||||
# re-configure php.ini
|
# re-configure php.ini
|
||||||
- name: Update php.ini
|
- name: Update php.ini
|
||||||
template: src=php7.0-php.ini.j2 dest=/etc/php/7.0/fpm/php.ini owner=root group=root mode=0644
|
template: src=php7.0-php.ini.j2 dest=/etc/php/7.0/fpm/php.ini owner=root group=root mode=0644
|
||||||
notify: restart php7.0-fpm
|
notify: reload php7.0-fpm
|
||||||
tags: php-fpm
|
tags: php-fpm
|
||||||
|
|
||||||
# vim: set ts=2 sw=2:
|
# vim: set ts=2 sw=2:
|
||||||
|
Loading…
Reference in New Issue
Block a user