added teams notification
This commit is contained in:
@@ -21,4 +21,18 @@
|
||||
when: reboot.stat.exists
|
||||
|
||||
- name: Wait for systems to become reachable
|
||||
wait_for_connection:
|
||||
wait_for_connection:
|
||||
|
||||
- name: Send Teams notification
|
||||
uri:
|
||||
url: "{{ Teams_webhook }}"
|
||||
method: POST
|
||||
body: |
|
||||
{
|
||||
"title": "Reboot Status",
|
||||
"text": "Servers checked: {{ ansible_play_hosts_all | join(', ') }}{% if reboot.stat.exists %}. Rebooted: {{ ansible_play_hosts_all | join(', ') }}{% endif %}"
|
||||
}
|
||||
body_format: json
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
when: reboot.stat.exists or not reboot.stat.exists
|
||||
Reference in New Issue
Block a user