--- - name: "[OpenRC] Enable and start service: php{{ services.php_fpm.version | default(7) }}-fpm (to deploy config changes)" service: name: php{{ services.php_fpm.version | default(7) }}-fpm enabled: yes state: started when: - ansible_service_mgr == "openrc" - name: "[systemd] Enable and start service: php-fpm7 (to deploy config changes)" systemd: name: php-fpm7 enabled: yes state: started when: - ansible_service_mgr == "systemd" - services.php_fpm.version is not defined or services.php_fpm.version == 7 - name: "[systemd] Enable and start service: php-fpm (to deploy config changes)" systemd: name: php-fpm enabled: yes state: started when: - ansible_service_mgr == "systemd" - services.php_fpm.version == 8