You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hey guys,
Is there a way to restart a service and wait for it to finish? I'm starting Keepalived using the service module and apparently it takes a few seconds to actually start after installation so it's throwing me an error.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
You can use the 'wait_for' module, just need a condition that verifies
the service is up, sadly most 'service managers' report the success of
'startup command' and not that the service is actually up.
Alternatively you can use service_facts to check for the service
status in an until loop that wait for it's success (assuming service
manager reports correct status).