Skip to content

Commit

Permalink
fix tag definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brakkio86 committed Apr 8, 2024
1 parent fbddddc commit 3e30465
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions roles/grafana/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
- grafana_datasources
- grafana_notifications
- grafana_dashboards
tags:
- grafana_install
- grafana_configure
- grafana_datasources
- grafana_notifications
- grafana_dashboards

- name: Install
ansible.builtin.include_tasks:
Expand All @@ -38,6 +44,8 @@
become: true
tags:
- grafana_install
tags:
- grafana_install

- name: Configure
ansible.builtin.include_tasks:
Expand All @@ -46,13 +54,17 @@
become: true
tags:
- grafana_configure
tags:
- grafana_configure

- name: Plugins
ansible.builtin.include_tasks:
file: plugins.yml
apply:
tags:
- grafana_configure
tags:
- grafana_configure
when: "grafana_plugins != []"

- name: "Restart grafana before configuring datasources and dashboards"
Expand Down Expand Up @@ -85,6 +97,9 @@
tags:
- grafana_configure
- grafana_run
tags:
- grafana_configure
- grafana_run
when: "grafana_api_keys | length > 0"

- name: Datasources
Expand All @@ -95,6 +110,10 @@
- grafana_configure
- grafana_datasources
- grafana_run
tags:
- grafana_configure
- grafana_datasources
- grafana_run
when: "grafana_datasources != []"

- name: Notifications
Expand All @@ -105,6 +124,10 @@
- grafana_configure
- grafana_notifications
- grafana_run
tags:
- grafana_configure
- grafana_notifications
- grafana_run
when: "grafana_alert_notifications | length > 0 or grafana_alert_resources | length > 0"

- name: Dashboards
Expand All @@ -115,6 +138,10 @@
- grafana_configure
- grafana_dashboards
- grafana_run
tags:
- grafana_configure
- grafana_dashboards
- grafana_run
when: "grafana_dashboards | length > 0 or __found_dashboards | length > 0"
vars:
__found_dashboards: "{{ lookup('fileglob', grafana_dashboards_dir + '/*.json', wantlist=True) }}"

0 comments on commit 3e30465

Please sign in to comment.