community / community.grafana / 1.8.0 / module / grafana_team Manage Grafana Teams | "added in version" 1.0.0 of community.grafana" Authors: Rémi REY (@rrey)community.grafana.grafana_team (1.8.0) — module
Install with ansible-galaxy collection install community.grafana:==1.8.0
collections: - name: community.grafana version: 1.8.0
Create/update/delete Grafana Teams through the Teams API.
Also allows to add members in the team (if members exists).
--- - name: Create a team community.grafana.grafana_team: url: "https://grafana.example.com" grafana_api_key: "{{ some_api_token_value }}" name: "grafana_working_group" email: "foo.bar@example.com" state: present
- name: Create a team with members community.grafana.grafana_team: url: "https://grafana.example.com" grafana_api_key: "{{ some_api_token_value }}" name: "grafana_working_group" email: "foo.bar@example.com" members: - john.doe@example.com - jane.doe@example.com state: present
- name: Create a team with members and enforce the list of members community.grafana.grafana_team: url: "https://grafana.example.com" grafana_api_key: "{{ some_api_token_value }}" name: "grafana_working_group" email: "foo.bar@example.com" members: - john.doe@example.com - jane.doe@example.com enforce_members: true state: present
- name: Delete a team community.grafana.grafana_team: url: "https://grafana.example.com" grafana_api_key: "{{ some_api_token_value }}" name: "grafana_working_group" email: "foo.bar@example.com" state: absent
url: aliases: - grafana_url description: - The Grafana URL. required: true type: str name: description: - The name of the Grafana Team. required: true type: str email: description: - The mail address associated with the Team. required: true type: str state: choices: - present - absent default: present description: - Delete the members not found in the C(members) parameters from the - list of members found on the Team. type: str members: description: - List of team members (emails). - The list can be enforced with C(enforce_members) parameter. elements: str type: list use_proxy: default: true description: - If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool client_key: description: - PEM formatted file that contains your private key to be used for SSL client authentication. - If I(client_cert) contains both the certificate and key, this option is not required. type: path client_cert: description: - 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, I(client_key) is not required type: path url_password: aliases: - grafana_password default: admin description: - The Grafana password for API authentication. type: str url_username: aliases: - grafana_user default: admin description: - The Grafana user for API authentication. type: str validate_certs: default: true description: - If C(false), SSL certificates will not be validated. - This should only set to C(false) used on personally controlled sites using self-signed certificates. type: bool enforce_members: default: false description: - Delete the members not found in the C(members) parameters from the - list of members found on the Team. type: bool grafana_api_key: description: - The Grafana API key. - If set, C(url_username) and C(url_password) will be ignored. type: str skip_version_check: default: false description: - Skip Grafana version check and try to reach api endpoint anyway. - This parameter can be useful if you enabled C(hide_version) in grafana.ini required: false type: bool version_added: 1.2.0 version_added_collection: community.grafana
team: contains: avatarUrl: description: The url of the Team avatar on Grafana server returned: always sample: - /avatar/a7440323a684ea47406313a33156e5e9 type: str email: description: The Team email address returned: always sample: - foo.bar@example.com type: str id: description: The Team email address returned: always sample: - 42 type: int memberCount: description: The number of Team members returned: always sample: - 42 type: int members: description: The list of Team members returned: always sample: - - john.doe@exemple.com type: list name: description: The name of the team. returned: always sample: - grafana_working_group type: str orgId: description: The organization id that the team is part of. returned: always sample: - 1 type: int description: Information about the Team returned: On success type: complex