community.grafana.grafana_dashboard – list or search grafana dashboards
Note
This plugin is part of the community.grafana collection (version 1.2.3).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.grafana
.
To use it in a playbook, specify: community.grafana.grafana_dashboard
.
Synopsis
- This lookup returns a list of grafana dashboards with possibility to filter them by query.
Parameters
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
grafana_api_key string | env:GRAFANA_API_KEY | Grafana API key. When grafana_api_key is set, the options grafana_user , grafana_password and grafana_org_id are ignored. | |
grafana_org_id string | Default: 1 | env:GRAFANA_ORG_ID | grafana organisation id. |
grafana_password string | Default: "admin" | env:GRAFANA_PASSWORD | grafana authentication password. |
grafana_url string | Default: "http://127.0.0.1:3000" | env:GRAFANA_URL | url of grafana. |
grafana_user string | Default: "admin" | env:GRAFANA_USER | grafana authentication user. |
search string | env:GRAFANA_DASHBOARD_SEARCH | optional filter for dashboard search. |
Examples
- name: get project foo grafana dashboards set_fact: grafana_dashboards: "{{ lookup('grafana_dashboard', 'grafana_url=http://grafana.company.com grafana_user=admin grafana_password=admin search=foo') }}" - name: get all grafana dashboards set_fact: grafana_dashboards: "{{ lookup('grafana_dashboard', 'grafana_url=http://grafana.company.com grafana_api_key=' ~ grafana_api_key) }}"
Authors
- Thierry Salle (@seuf)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/grafana/grafana_dashboard_lookup.html