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:
Alan Orth 2017-11-03 11:53:42 +02:00
parent 2a230ceff4
commit 51183617b8
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
service: name=php5-fpm state=restarted
# For Ubuntu 16.04
- name: restart php7.0-fpm
systemd: name=php7.0-fpm state=restarted
- name: reload php7.0-fpm
systemd: name=php7.0-fpm state=reloaded
# vim: set ts=2 sw=2:

View File

@ -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
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)
notify: restart php7.0-fpm
notify: reload php7.0-fpm
tags: php-fpm
- name: Remove default www pool
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
# re-configure 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
notify: restart php7.0-fpm
notify: reload php7.0-fpm
tags: php-fpm
# vim: set ts=2 sw=2: