Update main.yml

This commit is contained in:
Ishan Jain 2023-03-03 15:12:06 +05:30 committed by GitHub
parent a513d9b64f
commit 71e05aa022
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,16 @@
---
- name: Set Notification policy tree
grafana.grafana.alert_notification_policy:
stack_slug: "{{ stack_name }}"
grafana_api_key: "{{ grafana_api_key }}"
routes:
- receiver: ansible,
object_matchers: [["env", "=", "Production"]]
routes: [
{
receiver: grafana-default-email,
object_matchers: [["env", "=", "Production"]],
}
]
register: result
- name: Notification Check
ansible.builtin.assert:
- assert:
that:
- result.failed == false
- result.output.provenance == "api"