grafana.grafana.folder module – Manage Folders in Grafana
Note
This module is part of the grafana.grafana collection (version 2.2.5).
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 grafana.grafana
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: grafana.grafana.folder
.
New in grafana.grafana 0.0.1
Synopsis
Create, Update and delete Folders via Ansible.
Requirements
The below requirements are needed on the host that executes this module.
requests >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
Grafana API Key to authenticate with Grafana. |
|
URL of the Grafana instance. |
|
Set to Choices:
|
|
State for the Grafana Folder. Choices:
|
|
Sets the title of the folder. |
|
Sets the UID for your folder. |
Notes
Note
Does not support
check_mode
.
Examples
- name: Create/Update a Folder in Grafana
grafana.grafana.folder:
title: folder_name
uid: folder_name
overwrite: true
grafana_url: "{{ grafana_url }}"
grafana_api_key: "{{ grafana_api_key }}"
state: present
- name: Delete a Folder in Grafana
grafana.grafana.folder:
uid: folder_name
grafana_url: "{{ grafana_url }}"
grafana_api_key: "{{ grafana_api_key }}"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dict object containing folder information. Returned: On success |
|
Boolean value specifying if current user can admin in folder. Returned: state is present and on success Sample: |
|
Boolean value specifying if current user can delete the folder. Returned: state is present and on success Sample: |
|
Boolean value specifying if current user can edit in folder. Returned: state is present and on success Sample: |
|
Boolean value specifying if current user can save in folder. Returned: state is present and on success Sample: |
|
The date when folder was created. Returned: state is present and on success Sample: |
|
The name of the user who created the folder. Returned: state is present and on success Sample: |
|
Boolean value specifying if folder has acl. Returned: state is present and on success Sample: |
|
The ID for the folder. Returned: state is present and on success Sample: |
|
The message returned after the operation on the folder. Returned: state is absent and on success Sample: |
|
The name of the folder. Returned: on success Sample: |
|
The UID for the folder. Returned: state is present and on success Sample: |
|
The date when the folder was last updated. Returned: state is present and on success Sample: |
|
The name of the user who last updated the folder. Returned: state is present and on success Sample: |
|
The URl for the folder. Returned: state is present and on success Sample: |
|
The version of the folder. Returned: state is present and on success Sample: |