# Event-Driven Ansible - ChatOps - From Chat to Action

**URL:** <https://forum.ansible.com/t/event-driven-ansible-chatops-from-chat-to-action/279>\
**Category:** Blog\
**Tags:** ansible-rulebook, chatops, eda-server\
**Created:** [September 6, 2023, 3:28pm UTC](https://forum.ansible.com/t/event-driven-ansible-chatops-from-chat-to-action/279 "2023-09-06T15:28:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/leo/32/23_2.png) [@Leo](https://forum.ansible.com/u/Leo)\
**Post date:** [September 6, 2023, 3:28pm UTC](https://forum.ansible.com/t/event-driven-ansible-chatops-from-chat-to-action/279/1 "2023-09-06T15:28:02Z")

</div>

September 1, 2023 by [Nuno Martins](https://www.ansible.com/blog/author/nuno-martins)

 ![](https://us1.discourse-cdn.com/ansible/original/1X/aeffbddeef3fa8b2ca4b2176e9985067ac076ea5.png)

Like any well-rounded individual, in times of intense concentration, you will find me talking to myself in search of some hidden knowledge that I might have received in a dream, or perhaps quoting something from a fantasy novel about wizards and creatures in an attempt to fix a problem. Unfortunately, wearing a robe and shouting “Repairo Network!” while pointing my pen toward the device has yet to help in any situation.

At the 2023 AnsibleFest, as part of the main stage demonstration, I used the magic of Event-Driven Ansible to integrate ChatOps in our fictional infrastructure drama. ChatOps is not new, but I think it’s a pretty cool way to make changes or interact with your infrastructure.

We know that Event-Driven Ansible requires a source for events, a list of conditions which we call rulesets, and ultimately an action to match those conditions, which makes it perfect to use as a chatbot-type system.

For me to have a heart-to-heart with my beloved network, I will need to configure my chat as a source of events for Event-Driven Ansible, and to do this, I will use the webhook source plugin, which is part of the [ansible.eda](https://galaxy.ansible.com/ansible/eda) collection. Many enterprise chat platforms provide a method to send and receive webhooks to trigger words in the chat, which is perfect for what we want to do.

 ![Event-Driven Ansible ChatOps mechanism](https://us1.discourse-cdn.com/ansible/original/1X/20c3cd01a4df9f87fa71c379e1395eb840062d95.png)

_Event-Driven Ansible ChatOps mechanism_

- We will use an outgoing webhook from the chat application to Event-Driven Ansible.
- Event-Driven Ansible will match the payload against its defined conditions.
- Once a condition is met, the corresponding action will take place.
- Feedback notification will be sent from the action as an incoming webhook to the chat.

Now that the fundamentals are done, let’s look at how we could use this. […]

* * *

_Continue reading the article here:_

> **[Event-Driven Ansible - ChatOps - From Chat to Action](https://www.redhat.com/en/blog/event-driven-ansible-chatops-from-chat-to-action?sc_cid=7015Y000003t7aWQAQ)**
>
> Implement Automated ChatOps: Learn how to use event-driven automation to take action from chat information.

_You are welcome to reply to this topic to comment or discuss_

---

<div class="post-metadata">

**Author:** ![IPvSean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ipvsean/32/1153_2.png) [@IPvSean](https://forum.ansible.com/u/IPvSean)\
**Post date:** [September 7, 2023, 1:23pm UTC](https://forum.ansible.com/t/event-driven-ansible-chatops-from-chat-to-action/279/2 "2023-09-07T13:23:45Z")

</div>

To add to this, Nuno just put together this awesome video on YouTube (embedded here) around NetOps, ChatOps and Event-Driven Ansible ⏰ 13 minutes

[![](https://us1.discourse-cdn.com/ansible/original/1X/a1a1296da3917787037647e6ac569f38c9bdb072.jpeg "Demo: NetOps, ChatOps and Event-Driven Ansible") ](https://www.youtube.com/watch?v=Dj7dhZdnRIY)
