On Wed, Nov 26, 2014 at 2:54 AM, Adrian Grebin <adrian.gre...@gmail.com> wrote:
> I wrote a simple task:
>
> - name: make sure opsware-agent is runnning
>   service: name=opsware-agent state=running
> pattern="/opt/opsware/agent/bin/python
> /opt/opsware/agent/pylibs/shadowbot/daemonbot.pyc --conf
> /etc/opt/opsware/agent/agent.args"
>
>
>
> This runs so far when the agent is installed, if it is not running it will
> restart it.

Would it not be a good idea to use stat to first check if the files
are present? If not, that means it isn't installed and wouldn't
trigger any error.
Then do the check whether service is running.

-- 
With Regards,
Mehul Ved

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADTL0obLq1dpC0sC89N%3DOT9_5GHxakSPNr1qDE01WvzfKxba8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to