Open shantanoo-desai opened 10 months ago
Importing the Grafana Dashboard JSON via the User-Interface has better User-Experience than via the ansible.community.grafana
collection
ansible.community.grafana
import / export features rely on dashboards file to exist on the controlled nodes NOT on the controller node.
---
- name: Playbook to Manage Grafana Dashboards
hosts: localhost
gather_facts: true
vars_files:
- vars/creds.yml
collections:
- community.grafana
tasks:
- name: Export Grafana Dashboard
community.grafana.grafana_dashboard:
grafana_url: "http://localhost/grafana"
grafana_user: "{{ credentials.grafana.admin_username }}@localhost"
grafana_password: "{{ credentials.grafana.admin_password }}"
validate_certs: false
path: "./dashboard_test.json"
overwrite: yes
state: present
use_proxy: false
Description
Provide playbook(s) to import / export Grafana Dashboards. Conduct checks on datasource compatibility. Use the
ansible.community.grafana
Galaxy Collection for the playbook modules.Tasks