8eeaea2aa8
* Fixing cloud_plugin idempotency * Sanity check fixes * fix test * fix * reset test * Add 9dempotency check to test * Working cloud_plugin with idempotency * Adding idempotency for contactPoint * fixes * Tests update * sanity fix * Fixed * Fixes * sanity fix * Fix sanity * fixes * fixes * Fixed idempotency * fix sanity * alert_notification update * fix notification * fixes * folder idempotency * folder test Co-authored-by: ishanjainn <ishan.jain@gmail.com>
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
- name: Create Alerting contact point
|
|
grafana.grafana.alert_contact_point:
|
|
name: ops-email
|
|
uid: opsemail
|
|
type: email
|
|
settings: {
|
|
addresses: "ops@mydomain.com,devs@mydomain.com"
|
|
}
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: present
|
|
register: add_result
|
|
|
|
- assert:
|
|
that:
|
|
- add_result.failed == false
|
|
- add_result.output.provenance == "api"
|
|
|
|
- name: Idempotency Check
|
|
grafana.grafana.alert_contact_point:
|
|
name: ops-email
|
|
uid: opsemail
|
|
type: email
|
|
settings: {
|
|
addresses: "ops@mydomain.com,devs@mydomain.com"
|
|
}
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: present
|
|
register: idempotent_result
|
|
|
|
- assert:
|
|
that:
|
|
- idempotent_result.changed == false
|
|
- idempotent_result.output.provenance == "api"
|
|
|
|
- name: Update Alerting contact point
|
|
grafana.grafana.alert_contact_point:
|
|
name: ops-email
|
|
uid: opsemail
|
|
type: email
|
|
settings: {
|
|
addresses: "ops@mydomain.com,devs@mydomain.com,admin@mydomain.com"
|
|
}
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: present
|
|
register: update_result
|
|
|
|
- assert:
|
|
that:
|
|
- update_result.failed == false
|
|
- update_result.output.provenance == "api"
|
|
|
|
- name: Delete Alerting contact point
|
|
grafana.grafana.alert_contact_point:
|
|
name: ops-email
|
|
uid: opsemail
|
|
type: email
|
|
settings: {
|
|
addresses: "ops@mydomain.com,devs@mydomain.com,admin@mydomain.com"
|
|
}
|
|
stack_slug: "{{ stack_name }}"
|
|
grafana_api_key: "{{ grafana_api_key }}"
|
|
state: absent
|
|
register: delete_result
|
|
|
|
- assert:
|
|
that:
|
|
- delete_result.failed == false
|
|
- delete_result.output.message == "contactpoint deleted" |