From 84ab337202415dbf2fe694f156128f721b502a84 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Tue, 16 May 2017 22:05:27 -0500 Subject: [PATCH] Issue #191: Add workaround for Debian not enabling service. --- tasks/configure-fpm.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tasks/configure-fpm.yml b/tasks/configure-fpm.yml index 5c16855..c9c08bc 100644 --- a/tasks/configure-fpm.yml +++ b/tasks/configure-fpm.yml @@ -70,9 +70,17 @@ notify: restart php-fpm - name: Ensure php-fpm is started and enabled at boot (if configured). + service: + name: "{{ php_fpm_daemon }}" + state: started + enabled: yes + when: php_enable_php_fpm and ansible_distribution != "Debian" + +# See: https://github.com/ansible/ansible/issues/22303 +- name: Ensure php-fpm is started and enabled at boot (if configured, Debian). service: name: "{{ php_fpm_daemon }}" state: started enabled: yes use: service - when: php_enable_php_fpm + when: php_enable_php_fpm and ansible_distribution == "Debian"