Difference between revisions of "AWX Telegram Notification"
Jump to navigation
Jump to search
(→Setup) |
|||
Line 9: | Line 9: | ||
** HTTP Method: POST | ** HTTP Method: POST | ||
** HTTP Headers:<tt>{"Content-Type":"application/json"}</tt> | ** HTTP Headers:<tt>{"Content-Type":"application/json"}</tt> | ||
− | ** Start/Success/Error message body | + | ** Start/Success/Error message body |
<pre> | <pre> | ||
{ | { |
Revision as of 13:30, 14 June 2024
1 AWX Telegram Notification
With notification Plugins, you can get informent about what your AWX/Ansible Tower is up tp.
2 Setup
- AWX > Notification > Add
- Name: Telegram
- Notification Type: Webhook
- Target URL: https://api.telegram.org/bot<INSERT_AUTH_TOKEN_HERE>/sendMessage
- HTTP Method: POST
- HTTP Headers:{"Content-Type":"application/json"}
- Start/Success/Error message body
{ "chat_id": "<INSERT_CHAT_ID_HERE>", "text": "BITBULL AWX Job Notification\nName: {{ job.name }}\nstarted: {{ job.started }}\nstatus: {{ job.status }}\nurl: {{ url }}\n" }
- Workflow approved message body
{ "chat_id": "<INSERT_CHAT_ID_HERE>", "text": "BITBULL AWX Notification\nThe approval node \"{{ approval_node_name }}\" was approved. {{ workflow_url }}" }
- Workflow denied message body
{ "chat_id": "<INSERT_CHAT_ID_HERE>", "text": "BITBULL AWX Notification\nThe approval node \"{{ approval_node_name }}\" was denied. {{ workflow_url }}" }
- Workflow pending message body
{ "chat_id": "<INSERT_CHAT_ID_HERE>", "text": "BITBULL AWX Notification\nThe approval node \"{{ approval_node_name }}\" needs review. This node can be viewed at: {{ workflow_url }}" }
- Workflow timed out message body
{ "chat_id": "<INSERT_CHAT_ID_HERE>", "text": "BITBULL AWX Notification\nName: "The approval node \"{{ approval_node_name }}\" has timed out. {{ workflow_url }}" }