grafana.grafana.folder module – Manage Folders in Grafana
Note
This module is part of the grafana.grafana collection (version 0.0.7).
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
.
To use it in a playbook, specify: grafana.grafana.folder
.
New in version 0.0.1: of grafana.grafana
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. |
|
Set to false if you dont want to overwrite existing folder with newer version. Choices:
|
|
Name of the Grafana Cloud stack to which the folder will be added |
|
State for the Grafana CLoud stack. Choices:
|
|
The title of the folder. |
|
unique identifier for your folder. |
Examples
- name: Create/Update a Folder in Grafana
grafana.grafana.folder:
title: folder_name
uid: folder_name
overwrite: true
stack_slug: "{{ stack_slug }}"
grafana_api_key: "{{ grafana_api_key }}"
state: present
- name: Delete a Folder in Grafana
grafana.grafana.folder:
uid: folder_name
stack_slug: "{{ stack_slug }}"
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 |
|
Boolean value specifying if current user can delete the folder Returned: state is present and on success |
|
Boolean value specifying if current user can edit in folder Returned: state is present and on success |
|
Boolean value specifying if current user can save in folder Returned: state is present and on success |
|
The date when folder was created Returned: state is present and on success |
|
The name of the user who created the folder Returned: state is present and on success |
|
Boolean value specifying if folder has acl Returned: state is present and on success |
|
The ID for the folder Returned: on success |
|
The message returned after the operation on the folder Returned: state is absent and on success |
|
The name of the folder Returned: on success |
|
The UID for the folder Returned: state is present and on success |
|
The date when the folder was last updated Returned: state is present and on success |
|
The name of the user who last updated the folder Returned: state is present and on success |
|
The URl for the folder Returned: state is present and on success |
|
The version of the folder Returned: state is present and on success |