community.grafana.grafana_organization module – Manage Grafana Organization
Note
This module is part of the community.grafana collection (version 1.5.0).
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_organization
.
New in version 1.3.0: of community.grafana
Parameters
Parameter |
Comments |
---|---|
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 |
|
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. |
|
The name of the Grafana Organization. |
|
State if the organization should be present in Grafana or not Choices:
|
|
The Grafana URL. |
|
The Grafana password for API authentication. Default: “admin” |
|
The Grafana user for API authentication. Default: “admin” |
|
If Choices:
|
|
If This should only set to Choices:
|
Examples
---
- name: Create a Grafana organization
community.grafana.grafana_organization:
url: "https://grafana.example.com"
url_username: admin
url_password: changeme
name: orgtest
state: present
- name: Delete a Grafana organization
community.grafana.grafana_organization:
url: "https://grafana.example.com"
url_username: admin
url_password: changeme
name: orgtest
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Information about the organization Returned: when state present |
|
The org address Returned: always Sample: {“address1”: “”, “address2”: “”, “city”: “”, “country”: “”, “state”: “”, “zipCode”: “”} |
|
The org id Returned: always Sample: [42] |
|
The org name Returned: always Sample: [“org42”] |
Authors
paytroff (@paytroff)