Event Driven with ansible

38 views
Skip to first unread message

Sathya Narayanan

unread,
Nov 2, 2018, 7:43:33 AM11/2/18
to ansible...@googlegroups.com
Hello All,

just thought of checking, is ansible capable of doing EDI ( event-driven )?

I search some article on the internet and I found some saying its possible and some saying it's not, kind of confusing :(.

If possible, can you please guide me some article which talks more about it.

Regards,
Sathya.R

Brian Coca

unread,
Nov 2, 2018, 11:03:08 AM11/2/18
to ansible...@googlegroups.com
ansible itself does not have an event handler, but it is easy to
execute from one, bet it Tower/Awx, cron, incron, etc.
--
----------
Brian Coca

Sathya Narayanan

unread,
Nov 2, 2018, 11:20:22 AM11/2/18
to ansible...@googlegroups.com
Wow... that's great, can you share me some documentation or use case on the event-driven with Ansible.

I use ansible AWX for web UI.


--
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-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/CACVha7dDgdkWL%2BTOfeba%2BKA3oGTjZ71_UjZpht0gt6JJ6wBivw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Brian Coca

unread,
Nov 2, 2018, 12:02:58 PM11/2/18
to ansible...@googlegroups.com
I'm not sure what you want, that is a very generic ask, everything
from a AWX/Tower callback url to an flagf ile in the filesystem for
incron to trigger.

I even have an example of using an email filter to trigger Ansible
depending on email subject
https://image.slidesharecdn.com/ansibletipstricks-150604194554-lva1-app6892/95/ansible-tips-tricks-6-638.jpg?cb=1433447208
< from very old presentation

--
----------
Brian Coca

Sathya Narayanan

unread,
Nov 2, 2018, 2:17:52 PM11/2/18
to ansible...@googlegroups.com
Ah, that's not what I am look for. What I am trying to achieve is based on Nagios event ansible to execute pre defined playbooks for remidiating the errors 

Just the way event handler works in Nagios or similar to reactor in salstack.

--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

Brian Coca

unread,
Nov 2, 2018, 2:42:26 PM11/2/18
to ansible...@googlegroups.com
Just set a play as an event handler script, use a shebang and make the
file executable, the same slide deck contains an example on how to do
that.

--
----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages