Thanks dave, I will take a look it ansible-runner.

On Sat, 19 Jan 2019, 11:26 pm Dave Cottlehuber <d...@skunkwerks.at wrote:

> On Thu, 10 Jan 2019, at 17:47, Sathya Narayanan wrote:
> > Hi All,
> >
> > I know, I have ask this question before, but to my surprise I don't find
> > any better documentation on internet which can say how I can use mandible
> > as a EDI tool (event driven infra).
> >
> > We have nagios in our environment and use awx for automation. I already
> > have more to 50 templates and workflow for automating some basic tasks.
> Now
> > I need to make ansible to listen to nagios events and based on the events
> > ansible should trigger jobs.
> >
> > 1) I am not sure if my ask is possible.
> > 2) if its possible, can some one guide me with some good documentation
>
> Hi Sathya
>
> yes this is possible. You can use ansible-runner [1] to do this, but
> you'll need
> to do some work in python to deal with getting events out from nagios.
>
> I am using this setup with rabbitmq as an event source and it works nicely.
>
> [1]:
> https://ansible-runner.readthedocs.io/en/latest/python_interface.html#usage-examples
>
> The general approach is that you have a "main" python function that listens
> to your event stream from nagios, and if you see something interesting,
> then
> kick off an ansible runner.
>
> Concurrency is not python's strong point so bear in mind what might happen
> if you have multiple matching events arriving in a short space of time.
>
> A+
> Dave
>
> --
> 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/1547920603.2600366.1638829712.300D0A8B%40webmail.messagingengine.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CACqv84gok79bdPBLGx3jnhOauzgRdd_OTg8-smB-ape_YWFNQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to