Issue #191: Add workaround for Debian not enabling service.

This commit is contained in:
Jeff Geerling 2017-05-16 22:05:27 -05:00
parent 1d8d6fe497
commit 84ab337202

View File

@ -70,9 +70,17 @@
notify: restart php-fpm notify: restart php-fpm
- name: Ensure php-fpm is started and enabled at boot (if configured). - 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: service:
name: "{{ php_fpm_daemon }}" name: "{{ php_fpm_daemon }}"
state: started state: started
enabled: yes enabled: yes
use: service use: service
when: php_enable_php_fpm when: php_enable_php_fpm and ansible_distribution == "Debian"