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?
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.