Ansible Grafana
Configure Grafana organizations, dashboards, folders, datasources, teams and users.
Dependencies
Collections
- community.grafana
Role Variables
Variable | Required | Default |
---|---|---|
grafana_url | yes | |
grafana_username | yes | |
grafana_password | yes |
| grafana_users | name | yes | | email | no | | login | yes | | password | no | | is_admin | no | | state | no | | grafana_organizations | name | yes | | state | no | | grafana_teams | name | yes | | email | no | | members | no | | state | no | | enforce_members | no | | skip_version_check | no | | grafana_datasources | tls_skip_verify | no | | org_id | no | | name | yes | | ds_type | no | | access | no | | ds_url | no | | database | no | | with_credentials | no | | is_default | no | | user | no | | password | no | | additional_json_data | no | | additional_secure_json_data | no | | grafana_folders | name | yes | | state | no | | skip_version_check | no | | grafana_dashboards | org_id | no | | folder | no | | state | no | | slug | no | | uid | no | | path | no | | overwrite | no | | dashboard_id | no | | dashboard_revision | no | | commit_message | no |
Example Playbook
---
- hosts: localhost
gather_facts: false
vars:
grafana_url: "https://monitoring.example.com"
grafana_username: "api-user"
grafana_password: "******"
grafana_datasources:
- name: "Loki"
ds_type: "loki"
ds_url: "http://127.0.0.1:3100"
tls_skip_verify: yes
grafana_folders:
- name: my_service
- name: other_service
roles:
- role: telekom-mms.grafana