-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
etst: notification channel check for legacy api
- Loading branch information
Showing
1 changed file
with
28 additions
and
33 deletions.
There are no files selected for viewing
61 changes: 28 additions & 33 deletions
61
tests/integration/targets/grafana_notification_channel/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
--- | ||
- block: | ||
- ansible.builtin.include_tasks: | ||
file: dingding.yml | ||
- ansible.builtin.include_tasks: | ||
file: discord.yml | ||
- ansible.builtin.include_tasks: | ||
file: email.yml | ||
- ansible.builtin.include_tasks: | ||
file: googlechat.yml | ||
- ansible.builtin.include_tasks: | ||
file: hipchat.yml | ||
- ansible.builtin.include_tasks: | ||
file: kafka.yml | ||
- ansible.builtin.include_tasks: | ||
file: teams.yml | ||
- ansible.builtin.include_tasks: | ||
file: opsgenie.yml | ||
- ansible.builtin.include_tasks: | ||
file: pagerduty.yml | ||
- ansible.builtin.include_tasks: | ||
file: prometheus.yml | ||
- ansible.builtin.include_tasks: | ||
file: pushover.yml | ||
- ansible.builtin.include_tasks: | ||
file: sensu.yml | ||
- ansible.builtin.include_tasks: | ||
file: slack-and-beyond.yml | ||
- ansible.builtin.include_tasks: | ||
file: telegram.yml | ||
- ansible.builtin.include_tasks: | ||
file: victorops.yml | ||
- ansible.builtin.include_tasks: | ||
file: webhook.yml | ||
|
||
- name: Check for support of API endpoint | ||
register: result | ||
ignore_errors: true | ||
community.grafana.grafana_notification_channel: | ||
title: apitest | ||
state: absent | ||
|
||
- name: Include notification channel task files | ||
ansible.builtin.include_tasks: "{{ item }}.yml" | ||
when: "result.msg | default('') != 'Legacy Alerting API is available up to Grafana v10'" | ||
loop: | ||
- dingding | ||
- discord | ||
- googlechat | ||
- hipchat | ||
- kafka | ||
- teams | ||
- opsgenie | ||
- pagerduty | ||
- prometheus | ||
- pushover | ||
- sensu | ||
- slack-and-beyond | ||
- telegram | ||
- victorops | ||
- webhook |