cancel
Showing results for 
Search instead for 
Did you mean: 
MichaelM26
Mission Specialist
Mission Specialist
  • 267 Views

RH294 Lab 4.7

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)

 

MichaelM26_3-1733204268105.png

 

MichaelM26_2-1733204217554.png

 

Does anyone know how to go about this?

 

Kind Regards,

Michael.

 

Labels (2)
3 Replies
Punyabrata
Flight Engineer
Flight Engineer
  • 192 Views

Hello , Michael

service module does not allow looping , you have to start each each service one by one

bonnevil
Starfighter Starfighter
Starfighter
  • 98 Views

@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.

 

Chetan_Tiwary_
Community Manager
Community Manager
  • 92 Views

@MichaelM26 The lab is working fine :

Chetan_Tiwary__1-1733774259186.png

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.

0 Kudos
Join the discussion
You must log in to join this conversation.