Difference between revisions of "AWX Telegram Notification"

From Bitbull Wiki
Jump to navigation Jump to search
Line 16: Line 16:
 
}
 
}
 
</pre>
 
</pre>
** Workflow approved message body
+
:* Workflow approved message body
 
<pre>
 
<pre>
 
{
 
{
Line 23: Line 23:
 
}
 
}
 
</pre>
 
</pre>
** Workflow denied message body
+
:* Workflow denied message body
 
<pre>
 
<pre>
 
{
 
{
Line 30: Line 30:
 
}
 
}
 
</pre>
 
</pre>
** Workflow pending message body
+
:* Workflow pending message body
 
<pre>
 
<pre>
 
{
 
{
Line 37: Line 37:
 
}
 
}
 
</pre>
 
</pre>
** Workflow timed out message body
+
:* Workflow timed out message body
 
<pre>
 
<pre>
 
{
 
{

Revision as of 13:31, 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 }}"
}