community.grafana.grafana_dashboard lookup – list or search grafana dashboards
Note
This lookup plugin is part of the community.grafana collection (version 1.5.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.
Keyword parameters
This describes keyword parameters of the lookup. These are the values key1=value1
, key2=value2
and so on in the following
examples: lookup('community.grafana.grafana_dashboard', key1=value1, key2=value2, ...)
and query('community.grafana.grafana_dashboard', key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
Grafana API key. When Configuration:
|
|
grafana authentication password. Default: Configuration:
|
|
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) }}"