cloudera.cloud.iam_group module – Create, update, or destroy CDP IAM Groups
Note
This module is part of the cloudera.cloud collection (version 3.1.0).
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 cloudera.cloud.
To use it in a playbook, specify: cloudera.cloud.iam_group.
New in cloudera.cloud 1.0.0
Synopsis
Create, update, and destroy CDP IAM Groups.
A group is a named collection of users and machine users.
Roles and resource roles can be assigned to a group impacting all members of the group.
Parameters
Parameter |
Comments |
|---|---|
If provided, the Cloudera on cloud API will use this value as its access key. If not provided, the API will attempt to use the value from the environment variable Required if Mutually exclusive with |
|
If provided, the Cloudera on cloud API will use this value as its credentials path. If not provided, the API will attempt to use the value from the environment variable Default: |
|
If Choices:
|
|
The Cloudera on cloud API endpoint to use. Mutually exclusive with |
|
Specify the Cloudera on cloud API endpoint region. See Cloudera Control Plane regions for more information. If not provided, the API will attempt to use the value from the environment variable
Mutually exclusive with Choices:
|
|
Verify the TLS certificates for the Cloudera on cloud API endpoint. Choices:
|
|
The HTTP user agent to use for Cloudera on cloud API requests. Default: |
|
The name of the group. The name must be unique, must have a maximum of 32 characters, and must contain only alphanumeric characters, “-”, and “_”. The first character of the name must be alphabetic or an underscore. Names are are not case-sensitive. The group named “administrators” is reserved. |
|
If provided, the Cloudera on cloud API will use this value as its private key. If not provided, the API will attempt to use the value from the environment variable Required if |
|
If provided, the Cloudera on cloud API will use this value as its profile. If not provided, the API will attempt to use the value from the environment variable Default: |
|
Flag to replace Choices:
|
|
A list of resource role assignments. |
|
The resource CRN for the rights assignment. |
|
The resource role CRN to be assigned. |
|
A single role or list of roles assigned to the group. The role must be identified by its full CRN. |
|
The state of the group. Choices:
|
|
Legacy CDPy SDK error handling. Choices:
|
|
Whether group membership is synced when a user logs in. The default is to sync group membership. Choices:
|
|
A single user or list of users assigned to the group. Users can be regular users or machine users. The user can be either the name or CRN. |
Examples
# Note: These examples do not set authentication details.
# Create a group
- cloudera.cloud.iam_group:
name: group-example
# Create a group with membership sync disabled
- cloudera.cloud.iam_group:
state: present
name: group-example
sync: false
# Delete a group
- cloudera.cloud.iam_group:
state: absent
name: group-example
# Assign users to a group
- cloudera.cloud.iam_group:
name: group-example
users:
- user-a
- user-b
# Assign roles to a group
- cloudera.cloud.iam_group:
name: group-example
roles:
- role-a
- role-b
# Replace resource roles a group
- cloudera.cloud.iam_group:
name: group-example
resource_roles:
- role-c
- role-d
purge: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The information about the Group Returned: always |
|
The date when this group record was created. Returned: on success Sample: |
|
The CRN of the group. Returned: on success |
|
The group name. Returned: on success Sample: |
|
List of member CRNs (users and machine users) which are members of the group. Returned: on success |
|
List of Resource-to-Role assignments that are associated with the group. Returned: on success |
|
The CRN of the resource granted the rights of the role. Returned: on success |
|
The CRN of the resource role. Returned: on success |
|
List of Role CRNs assigned to the group. Returned: on success |
|
Flag indicating whether group membership is synced when a user logs in. The default is to sync group membership. Returned: when supported |
|
Returns the captured CDP SDK log. Returned: when supported |
|
Returns a list of each line of the captured CDP SDK log. Returned: when supported |