grafana.grafana.alert_contact_point module – Manage Alerting Contact points in Grafana
Note
This module is part of the grafana.grafana collection (version 0.0.7).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install grafana.grafana
.
To use it in a playbook, specify: grafana.grafana.alert_contact_point
.
New in version 0.0.1: of grafana.grafana
Synopsis
Create, Update and delete Contact points using Ansible.
Requirements
The below requirements are needed on the host that executes this module.
requests >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
When set to True, Disables the resolve message [OK] that is sent when alerting state returns to false Choices:
|
|
Grafana API Key used to authenticate with Grafana. |
|
Name of the contact point |
|
Contact point settings |
|
Name of the Grafana Cloud stack to which the contact points will be added |
|
State for the Grafana CLoud stack. Choices:
|
|
Contact point type |
|
Sets the UID of the Contact point. |
Examples
- name: Create/Update 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_slug }}"
grafana_api_key: "{{ grafana_api_key }}"
state: present
- 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"
}
stack_slug: "{{ stack_slug }}"
grafana_api_key: "{{ grafana_api_key }}"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dict object containing Contact point information information Returned: On success |
|
When set to True, Disables the resolve message [OK] that is sent when alerting state returns to false Returned: state is present and on success |
|
The name for the contact point Returned: state is present and on success |
|
Contains contact point settings Returned: state is present and on success |
|
The type of contact point Returned: state is present and on success |
|
The UID for the contact point Returned: state is present and on success |