--- - name: "[Alpine] Check php{{ services.php_fpm.version | default(7) }}-fpm config for errors" shell: php{{ services.php_fpm.version | default(7) }}-fpm -t changed_when: True when: - ansible_service_mgr == "openrc" listen: "Restart php-fpm" - name: "[Archlinux] Check php-fpm7 config for errors" shell: php-fpm7 -t changed_when: True when: - ansible_service_mgr == "systemd" - services.php_fpm.version is not defined or services.php_fpm.version == 7 listen: "Restart php-fpm" - name: "[Archlinux] Check php-fpm config for errors" shell: php-fpm -t changed_when: True when: - ansible_service_mgr == "systemd" - services.php_fpm.version == 8 listen: "Restart php-fpm" - name: "[OpenRC] Restart service: php{{ services.php_fpm.version | default(7) }}-fpm (to deploy config changes)" service: name: php{{ services.php_fpm.version | default(7) }}-fpm state: restarted when: - ansible_service_mgr == "openrc" listen: "Restart php-fpm" - name: "[systemd] Restart service: php-fpm7 (to deploy config changes)" systemd: name: php-fpm7 state: restarted when: - ansible_service_mgr == "systemd" - services.php_fpm.version is not defined or services.php_fpm.version == 7 listen: "Restart php-fpm" - name: "[systemd] Restart service: php-fpm (to deploy config changes)" systemd: name: php-fpm state: restarted when: - ansible_service_mgr == "systemd" - services.php_fpm.version == 8 listen: "Restart php-fpm"