grafana-ansible-collection/tests/integration/targets/alert_notification_policy/tasks/main.yml

16 lines
415 B
YAML
Raw Normal View History

2023-03-03 09:53:02 +01:00
---
- name: Set Notification policy tree
grafana.grafana.alert_notification_policy:
stack_slug: "{{ stack_name }}"
grafana_api_key: "{{ grafana_api_key }}"
2023-03-03 09:53:02 +01:00
routes:
2023-03-03 10:31:42 +01:00
- receiver: ansible,
2023-03-03 09:53:02 +01:00
object_matchers: [["env", "=", "Production"]]
register: result
2023-03-03 09:53:02 +01:00
- name: Notification Check
ansible.builtin.assert:
that:
- result.failed == false
2023-03-03 09:53:02 +01:00
- result.output.provenance == "api"