community.grafana.grafana_organization_user module – Manage Grafana Organization Users.
Note
This module is part of the community.grafana collection (version 1.9.1).
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_user
.
New in community.grafana 1.6.0
Synopsis
Add or remove users or change their roles in Grafana organizations through org API.
The user has to exist before using this module. See https://docs.ansible.com/ansible/latest/collections/community/grafana/grafana_user_module.html.
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. |
|
Username or email. |
|
Organization ID. Mutually exclusive with Default: |
|
Organization name. Mutually exclusive with |
|
User’s role in the organization. Choices:
|
|
Status of a user’s organization membership. Choices:
|
|
The Grafana URL. |
|
The Grafana password for API authentication. Default: |
|
The Grafana user for API authentication. Default: |
|
If Choices:
|
|
If This should only set to Choices:
|
Examples
---
- name: Add user to organization
community.grafana.grafana_organization_user:
url: "{{ grafana_url }}"
url_username: "{{ grafana_username }}"
url_password: "{{ grafana_password }}"
login: john
role: admin
- name: Remove user from organization
community.grafana.grafana_organization_user:
url: "{{ grafana_url }}"
url_username: "{{ grafana_username }}"
url_password: "{{ grafana_password }}"
login: john
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 user Returned: when state present |
|
The User email address Returned: always Sample: |
|
The User login Returned: always Sample: |
|
The User name (same as login) Returned: always Sample: |
|
The organization id that the team is part of. Returned: always Sample: |
|
The user role in the organization Returned: always Can only return:
Sample: |