Do not run php-fpm when ansible is in check mode

This commit is contained in:
Vlad von Hraban 2023-05-22 14:50:07 +07:00
parent 2a53885145
commit f00951fe73
2 changed files with 5 additions and 1 deletions

View File

@ -13,3 +13,4 @@
when: when:
- php_enable_php_fpm - php_enable_php_fpm
- php_fpm_state == 'started' - php_fpm_state == 'started'
- not ansible_check_mode

View File

@ -50,4 +50,7 @@
name: "{{ php_fpm_daemon }}" name: "{{ php_fpm_daemon }}"
state: "{{ php_fpm_state }}" state: "{{ php_fpm_state }}"
enabled: "{{ php_fpm_enabled_on_boot }}" enabled: "{{ php_fpm_enabled_on_boot }}"
when: php_enable_php_fpm and ansible_distribution != "Debian" when:
- php_enable_php_fpm
- ansible_distribution != "Debian"
- not ansible_check_mode