Difference between revisions of "AWX Telegram Notification"
Jump to navigation
Jump to search
(Created page with "=AWX Telegram Notification= With notification Plugins, you can get informent about what your AWX/Ansible Tower is up tp. =Setup= * AWX > Notification > Add ** Name: Telegram...") |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
** Name: Telegram | ** Name: Telegram | ||
** Notification Type: Webhook | ** Notification Type: Webhook | ||
− | ** Target URL: https://api.telegram.org/bot<INSERT_AUTH_TOKEN_HERE>/sendMessage | + | ** Target URL: <pre>https://api.telegram.org/bot<INSERT_AUTH_TOKEN_HERE>/sendMessage</pre> |
− | ** HTTP Method: POST | + | ** HTTP Method: <pre>POST</pre> |
− | ** HTTP Headers:< | + | ** HTTP Headers:<pre>{"Content-Type":"application/json"}</pre> |
+ | ** Start/Success/Error message body | ||
+ | <pre> | ||
+ | { | ||
+ | "chat_id": "<INSERT_CHAT_ID_HERE>", | ||
+ | "text": "BITBULL AWX Job Notification\nName: {{ job.name }}\nstarted: {{ job.started }}\nstatus: {{ job.status }}\nurl: {{ url }}\n" | ||
+ | } | ||
+ | </pre> | ||
+ | :* Workflow approved message body | ||
+ | <pre> | ||
+ | { | ||
+ | "chat_id": "<INSERT_CHAT_ID_HERE>", | ||
+ | "text": "BITBULL AWX Notification\nThe approval node \"{{ approval_node_name }}\" was approved. {{ workflow_url }}" | ||
+ | } | ||
+ | </pre> | ||
+ | :* Workflow denied message body | ||
+ | <pre> | ||
+ | { | ||
+ | "chat_id": "<INSERT_CHAT_ID_HERE>", | ||
+ | "text": "BITBULL AWX Notification\nThe approval node \"{{ approval_node_name }}\" was denied. {{ workflow_url }}" | ||
+ | } | ||
+ | </pre> | ||
+ | :* Workflow pending message body | ||
+ | <pre> | ||
+ | { | ||
+ | "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 }}" | ||
+ | } | ||
+ | </pre> | ||
+ | :* Workflow timed out message body | ||
+ | <pre> | ||
+ | { | ||
+ | "chat_id": "<INSERT_CHAT_ID_HERE>", | ||
+ | "text": "BITBULL AWX Notification\nName: "The approval node \"{{ approval_node_name }}\" has timed out. {{ workflow_url }}" | ||
+ | } | ||
+ | </pre> | ||
+ | [[Category:AWX]] | ||
[[Category:Ansible]] | [[Category:Ansible]] | ||
− |
Latest revision as of 13:32, 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 }}" }