From 51183617b85659ff5ba393e53007463bf2e75e6d Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 3 Nov 2017 11:53:42 +0200 Subject: [PATCH] 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. --- roles/php-fpm/handlers/main.yml | 4 ++-- roles/php-fpm/tasks/Ubuntu.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/php-fpm/handlers/main.yml b/roles/php-fpm/handlers/main.yml index 956de62..21d2552 100644 --- a/roles/php-fpm/handlers/main.yml +++ b/roles/php-fpm/handlers/main.yml @@ -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: diff --git a/roles/php-fpm/tasks/Ubuntu.yml b/roles/php-fpm/tasks/Ubuntu.yml index 8e2cd14..2a46381 100644 --- a/roles/php-fpm/tasks/Ubuntu.yml +++ b/roles/php-fpm/tasks/Ubuntu.yml @@ -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: