diff options
Diffstat (limited to 'ansible_collections/community/grafana/roles')
4 files changed, 21 insertions, 1 deletions
diff --git a/ansible_collections/community/grafana/roles/grafana/README.md b/ansible_collections/community/grafana/roles/grafana/README.md index f46434edf..f76e687fc 100644 --- a/ansible_collections/community/grafana/roles/grafana/README.md +++ b/ansible_collections/community/grafana/roles/grafana/README.md @@ -163,6 +163,13 @@ Configure Grafana organizations, dashboards, folders, datasources, teams and use | webhook_password | no | | webhook_url | no | | webhook_username | no | +| [**grafana_silence**](https://docs.ansible.com/ansible/latest/collections/community/grafana/grafana_silence_module.html) | +| comment | yes | +| created_by | yes | +| ends_at | yes | +| matchers | yes | +| starts_at | yes | +| state | no | ## Example Playbook diff --git a/ansible_collections/community/grafana/roles/grafana/defaults/main.yml b/ansible_collections/community/grafana/roles/grafana/defaults/main.yml index 6a84370d3..9756a1331 100644 --- a/ansible_collections/community/grafana/roles/grafana/defaults/main.yml +++ b/ansible_collections/community/grafana/roles/grafana/defaults/main.yml @@ -7,3 +7,4 @@ grafana_datasources: [] grafana_folders: [] grafana_dashboards: [] grafana_notification_channels: [] +grafana_silences: [] diff --git a/ansible_collections/community/grafana/roles/grafana/meta/main.yml b/ansible_collections/community/grafana/roles/grafana/meta/main.yml index 47d4af5b7..b5df42193 100644 --- a/ansible_collections/community/grafana/roles/grafana/meta/main.yml +++ b/ansible_collections/community/grafana/roles/grafana/meta/main.yml @@ -2,7 +2,7 @@ galaxy_info: role_name: grafana author: community - description: Configure Grafana organizations, dashboards, folders, datasources, teams and users + description: Configure Grafana organizations, dashboards, folders, datasources, silences, teams and users license: GPLv3 min_ansible_version: "2.14" galaxy_tags: [grafana, monitoring] diff --git a/ansible_collections/community/grafana/roles/grafana/tasks/main.yml b/ansible_collections/community/grafana/roles/grafana/tasks/main.yml index 82bbc633d..1665a8562 100644 --- a/ansible_collections/community/grafana/roles/grafana/tasks/main.yml +++ b/ansible_collections/community/grafana/roles/grafana/tasks/main.yml @@ -201,3 +201,15 @@ loop: "{{ grafana_dashboards }}" loop_control: {loop_var: dashboard} tags: [dashboard, molecule-idempotence-notest] + + - name: Manage silence + community.grafana.grafana_silence: + comment: "{{ silence.comment }}" + created_by: "{{ silence.created_by }}" + starts_at: "{{ silence.starts_at }}" + ends_at: "{{ silence.ends_at }}" + matchers: "{{ silence.matchers }}" + state: "{{ silence.state | default(omit) }}" + loop: "{{ grafana_silences }}" + loop_control: {loop_var: silence} + tags: silence |