grafana.grafana.cloud_api_key module – Manage Grafana Cloud API keys
Note
This module is part of the grafana.grafana collection (version 5.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 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.cloud_api_key
.
New in grafana.grafana 0.0.1
Synopsis
Create and delete Grafana Cloud API keys using Ansible.
Requirements
The below requirements are needed on the host that executes this module.
requests >= 1.0.0
Parameters
Parameter |
Comments |
---|---|
Cloud API Key to authenticate with Grafana Cloud. |
|
If set to Choices:
|
|
Sets the name of the Grafana Cloud API key. |
|
Name of the Grafana Cloud organization in which Cloud API key will be created. |
|
Sets the role to be associated with the Cloud API key. Choices:
|
|
State for the Grafana Cloud API Key. Choices:
|
Notes
Note
Does not support
check_mode
.
Examples
- name: Create Grafana Cloud API key
grafana.grafana.cloud_api_key:
name: key_name
role: Admin
org_slug: "{{ org_slug }}"
existing_cloud_api_key: "{{ grafana_cloud_api_key }}"
fail_if_already_created: False
state: present
- name: Delete Grafana Cloud API key
grafana.grafana.cloud_api_key:
name: key_name
org_slug: "{{ org_slug }}"
existing_cloud_api_key: "{{ grafana_cloud_api_key }}"
state: absent