Skip to content

Commit 734e9ac

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 734e9ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

roles/grafana/tasks/dashboards.yml

Lines changed: 3 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,8 @@
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: "{{ (__dashboards_copied | json_query('results[*].dest') | default([]))
171+
+ (__dashboards_grafana_net_copied | json_query('results[*].dest') | default([])) }}"
171172
when: not ansible_check_mode
172173

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

0 commit comments

Comments
 (0)