At the moment running the role when in check mode always fails since the role is trying to start/restart php-fpm service. This will never succeed in check mode since no real changes are made to the target environment.
This change ensures that both restart php-fpm and Ensure php-fpm is started and enabled at boot (if configured). do not run in check mode.
Below is steps I took to reproduce the issue on Ubuntu 20.04
Run ansible-playbood --check --diff
Output:
fatal: [***]: FAILED! => {"changed": false, "msg": "Could not find the requested service php8.1-fpm: host"}
At the moment running the role when in check mode always fails since the role is trying to start/restart
php-fpm
service. This will never succeed in check mode since no real changes are made to the target environment.This change ensures that both
restart php-fpm
andEnsure php-fpm is started and enabled at boot (if configured).
do not run in check mode.Below is steps I took to reproduce the issue on Ubuntu 20.04
ansible-playbood --check --diff
Output:
Definition:
Environment: