# Elastic Alerting + Ansible Tower

**URL:** <https://discuss.elastic.co/t/elastic-alerting-ansible-tower/371865>\
**Category:** Kibana\
**Created:** [December 11, 2024, 6:52pm UTC](https://discuss.elastic.co/t/elastic-alerting-ansible-tower/371865 "2024-12-11T18:52:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikg](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@erikg](https://discuss.elastic.co/u/erikg)\
**Post date:** [December 11, 2024, 6:52pm UTC](https://discuss.elastic.co/t/elastic-alerting-ansible-tower/371865/1 "2024-12-11T18:52:50Z")

</div>

Is there a way to send an alert to Ansible Tower which will trigger an ansible playbook?

I was considering the webhook connector but it appears that Ansible Tower currently provides webhook integration with GitHub and GitLab. So not sure if I am not understanding this or perhaps there is another method?

---

<div class="post-metadata">

**Author:** ![strawgate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/strawgate/32/131008_2.png) [@strawgate](https://discuss.elastic.co/u/strawgate)\
**Post date:** [December 11, 2024, 7:22pm UTC](https://discuss.elastic.co/t/elastic-alerting-ansible-tower/371865/2 "2024-12-11T19:22:06Z")

</div>

Yeah, it looks like Ansible Tower does a good job making sure the "easy" webhook setup only works for Gitlab and Github.

That being said, a webhook is normally just a GET or POST request with a specific JSON body. With AWX/Tower you can launch a job by initiating a POST request to `https://TOWERSERVER/api/v2/job_templates/{TEMPLATE_ID}/launch/?format=api` with credentials.

I have not tested this so your mileage may vary but you may be able to setup the webhook pointed at your job template and it might just work. I believe the body of the request should appear as extra\_vars for your job but you will want to review ansible tower API documentation to be sure.

Someone with access to modify the webhook url may be able to launch other job templates so keep this in mind as you think about the surface area between the two tools.

---

<div class="post-metadata">

**Author:** ![erikg](https://avatars.discourse-cdn.com/v4/letter/e/91b2a8/32.png) [@erikg](https://discuss.elastic.co/u/erikg)\
**Post date:** [December 11, 2024, 8:09pm UTC](https://discuss.elastic.co/t/elastic-alerting-ansible-tower/371865/3 "2024-12-11T20:09:16Z")

</div>

Thank you!

I think this method might be the best possible way to do this. I also found there's a different approach with using Elastic for Event Driven Ansible.  
[Demo: Using Event-Driven Ansible with Elasticsearch logs!](https://www.youtube.com/watch?v=emHLD4_YcLw&list=PLdu06OJoEf2a3fFl6uaoyGV526ilwD97R&index=14)
