Hi guys, i am new to Ansible, and trying to make good use of it on our
environment.
We're running a tool that is called Opsware (that is some kind of ansible
as well...) that should be running it's agent on each node.
I want to automate the installation of the agent via ansible and trying to
write a role for it, not sure if i am going to need to write a module, i
think it wont be needed, but would appreciate your feedback.
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.
I wonder if the 'pattern' parameter is a good idea to check for the process
to be running if the agent is actually not installed, since it is not
installed via any software package system (yum/apt) so my idea to check if
it was installed is to check if the service is running and if it fails to
check the service status, then it is not installed.
I am unsure from here how to trigger the install if the 'pattern' fails...
I would appreciate your input/feedback with this issue.
Thanks!
~
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/72406309-7a62-4b4c-8906-bc9a7b422cd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.