community.grafana.grafana_folder – Manage Grafana Folders
community.grafana.grafana_folder – Manage Grafana Folders
Note
This plugin is part of the community.grafana collection (version 1.1.0).
To install it use: ansible-galaxy collection install community.grafana
.
To use it in a playbook, specify: community.grafana.grafana_folder
.
New in version 1.0.0: of community.grafana
Synopsis
- Create/update/delete Grafana Folders through the Folders API.
- The Folders API is only available starting Grafana 5 and the module will fail if the server version is lower than version 5.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
client_cert path |
PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, client_key is not required | |
client_key path |
PEM formatted file that contains your private key to be used for SSL client authentication. If client_cert contains both the certificate and key, this option is not required. | |
grafana_api_key string |
The Grafana API key. If set, | |
name string / required |
The title of the Grafana Folder.
| |
state string |
|
Delete the members not found in the list of members found on the Folder. |
url string / required |
The Grafana URL.
| |
url_password string |
Default: "admin" |
The Grafana password for API authentication.
|
url_username string |
Default: "admin" |
The Grafana user for API authentication.
|
use_proxy boolean |
|
If |
validate_certs boolean |
|
If This should only set to |
Examples
---
- name: Create a folder
community.grafana.grafana_folder:
url: "https://grafana.example.com"
grafana_api_key: "{{ some_api_token_value }}"
title: "grafana_working_group"
state: present
- name: Delete a folder
community.grafana.grafana_folder:
url: "https://grafana.example.com"
grafana_api_key: "{{ some_api_token_value }}"
title: "grafana_working_group"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
folder complex |
On success |
Information about the Folder
| |
canAdmin boolean |
always |
Boolean specifying if current user can admin in folder
Sample: [False] | |
canEdit boolean |
always |
Boolean specifying if current user can edit in folder
Sample: [False] | |
canSave boolean |
always |
Boolean specifying if current user can save in folder
Sample: [False] | |
created string |
always |
The folder creation date
Sample: ['2018-01-31T17:43:12+01:00'] | |
createdBy string |
always |
The name of the user who created the folder
Sample: ['admin'] | |
hasAcl boolean |
always |
Boolean specifying if folder has acl
Sample: [False] | |
id integer |
always |
The Folder identifier
Sample: [42] | |
title string |
always |
The Folder title
Sample: ['Department ABC'] | |
uid string |
always |
The Folder uid
Sample: ['nErXDvCkzz'] | |
updated string |
always |
The date the folder was last updated
Sample: ['2018-01-31T17:43:12+01:00'] | |
updatedBy string |
always |
The name of the user who last updated the folder
Sample: ['admin'] | |
url string |
always |
The Folder url
Sample: ['/dashboards/f/nErXDvCkzz/department-abc'] | |
version integer |
always |
The folder version
Sample: [1] |
Authors
- Rémi REY (@rrey)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/grafana/grafana_folder_module.html