Skip to content

Commit 3825605

Browse files
committed
grafana: Fix grafana.net dashboards registering
Fix regression introduced in a505ebf. We used the same var for both grafana.net and custom dashboards (__dashboards_copied)
1 parent c008248 commit 3825605

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

roles/grafana/tasks/dashboards.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
with_fileglob:
149149
- "{{ __tmp_dashboards.path }}/*"
150150
become: true
151-
register: __dashboards_copied
151+
register: __dashboards_grafana_net_copied
152152
notify: "provisioned dashboards changed"
153153
when: not ansible_check_mode
154154

@@ -167,7 +167,12 @@
167167
- name: "Register present and copied dashboards list"
168168
ansible.builtin.set_fact:
169169
__dashboards_present_list: "{{ __dashboards_present | json_query('files[*].path') | default([]) }}"
170-
__dashboards_copied_list: "{{ __dashboards_copied | json_query('results[*].dest') | default([]) }}"
170+
__dashboards_copied_list: "{{
171+
(
172+
(__dashboards_copied | json_query('results[*].dest')) +
173+
(__dashboards_grafana_net_copied | json_query('results[*].dest'))
174+
) | default([])
175+
}}"
171176
when: not ansible_check_mode
172177

173178
- name: "Remove dashboards not present on deployer machine (synchronize)"

0 commit comments

Comments
 (0)