This repository was archived by the owner on May 31, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change 88 delegate_to : localhost
99 run_once : true
1010
11- - name : download grafana dashboard from grafana.net to local folder
11+ # - name: download grafana dashboard from grafana.net to local folder
12+ # become: false
13+ # get_url:
14+ # url: "https://grafana.com/api/dashboards/{{ item.dashboard_id }}/revisions/{{ item.revision_id }}/download"
15+ # dest: "/tmp/dashboards/{{ item.dashboard_id }}.json"
16+ # register: _download_dashboards
17+ # until: _download_dashboards is succeeded
18+ # retries: 5
19+ # delay: 2
20+ # delegate_to: localhost
21+ # run_once: true
22+ # changed_when: false
23+ # with_items: "{{ grafana_dashboards }}"
24+ # when: grafana_dashboards | length > 0
25+
26+ # Use curl to solve issue #77
27+ - name : download grafana dashboard from grafana.net to local directory
1228 become : false
13- get_url :
14- url : " https://grafana.com/api/dashboards/{{ item.dashboard_id }}/revisions/{{ item.revision_id }}/download"
15- dest : " /tmp/dashboards/{{ item.dashboard_id }}.json"
29+ command : " curl --compressed https://grafana.com/api/dashboards/{{ item.dashboard_id }}/revisions/{{ item.revision_id }}/download -o /tmp/dashboards/{{ item.dashboard_id }}.json"
30+ args :
31+ creates : " /tmp/dashboards/{{ item.dashboard_id }}.json"
32+ warn : false
1633 register : _download_dashboards
1734 until : _download_dashboards is succeeded
1835 retries : 5
1936 delay : 2
2037 delegate_to : localhost
2138 run_once : true
22- changed_when : false
2339 with_items : " {{ grafana_dashboards }}"
2440 when : grafana_dashboards | length > 0
41+ tags :
42+ - skip_ansible_lint
2543
2644# As noted in [1] an exported dashboard replaces the exporter's datasource
2745# name with a representative name, something like 'DS_GRAPHITE'. The name
You can’t perform that action at this time.
0 commit comments