Ansible 2.1
In the playbook, I started a process:
- name: Start Automation Agent, and enable start on boot
service: name=mongodb-mms-automation-agent state=started enabled=yes
From play recap, it appears the process has successfully started.
TASK [install : Start automation agent, and enable start on boot] **************
changed: [server1]
However, when log in to remote host and do a ps, the process is not running. Checking on process log it had failed some pre-requisite (intended for testing).
How do I write a task in a playbook to confirm the process has successfully started?
Indeed it will. If that is a possibility then I add ignore_errors:true and still register a variable for the result. The variable will then give you a status and msg if the service fails.
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/-LMHCCDAn0w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5751DDFE.1070601%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.