Right way to wait for service start

Hi,

I would like to restart a server and wait till the services start up. I can us the wait_for module to wait for ports to be up, but how can I wait for the services to be up? The service modules seem to start,stop or restart service, but I don’t want to do any of these operations. Only wait till services are up. On linux I am able to run a command and loop until it returns true. But is there a direct support for this in Ansible or the Services module?

Thanks

Check out until
https://docs.ansible.com/ansible/playbooks_loops.html#do-until-loops