-1

I am newbie to ansible. I have multiple job templates. currently I am launching job template through Ansible tower api and I am calling Ansible tower job status api to check if job is completed or not. Is there a way I can get a callback to an external api after job completion as acknowledgement that job is completed. Appreciate the help

raj
  • 19
  • 4
  • "_Is there a way I get a callback to an API_", according documentation [Job Templates](https://docs.ansible.com/ansible-tower/latest/html/userguide/job_templates.html) it seems so. – U880D Mar 25 '22 at 05:27
  • can we call external Api after job completion as callback – raj Mar 25 '22 at 05:33

2 Answers2

0

Enabled Notifications and configure a notification template on Ansible Tower. It can notify the job status.

Or at the end of every playbook, you can include a task to send mail or slack message notifcation.

KrishnaR
  • 344
  • 4
  • 14
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 30 '22 at 20:51
0

You may use ansible webhooks. And you may put API call in the webhook.

Refer the Ansible Tower documentation link https://docs.ansible.com/ansible-tower/latest/html/userguide/webhooks.html