Hi All,
I've just been working through the Chapter 4 Lab and have come across this error.
It originally appeared on the error handling section when you need to restart the service, however it now starts when starting the service in the originating task (please see my code and error below)
Does anyone know how to go about this?
Kind Regards,
Michael.
Hello , Michael
service module does not allow looping , you have to start each each service one by one
@Punyabrata Um, the loop mechanism is starting each service one by one in that example. It's not passing a list of services to the module all at once, it's passing each item in the list to the service module one at a time as separate calls.
As it says, the next thing to check is what a manual systemctl status httpd says on the failed remote host (serverb.lab.example.com in this case). It sounds like the service is crashing for some reason. Could be that there's a lab bug, could be that the configuration file for the service got edited and httpd isn't starting, could be some other playbook error (although I'd have to look to see what else that exercise does).
It does look like the package is installed, or I think we'd get a "could not find the service" error from ansible.builtin.service.
@MichaelM26 The lab is working fine :
Please check the service status using systemctl command and your yaml file for any errors.
Share your full yaml file and the full results screenshot.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.