cloudera.cloud.iam_user_info module – Gather information about CDP Public IAM users

Note

This module is part of the cloudera.cloud collection (version 2.5.1).

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_user_info.

Synopsis

  • Gather information about CDP Public IAM users

Parameters

Parameter

Comments

cdp_region

aliases: cdp_endpoint_region, endpoint_region

string

Specify the Cloudera Data Platform endpoint region.

Default: "default"

current_user

boolean

Flag to use the current user login.

Mutually exclusive with name.

Choices:

  • false ← (default)

  • true

debug

aliases: debug_endpoints

boolean

Capture the CDP SDK debug log.

Choices:

  • false ← (default)

  • true

filter

dictionary

Key value pair where the key is the field to compare and the value is a regex statement. If there is a match in the regex statment, the user will return.

Mutually exclusive with current user and name

name

aliases: user_name

list / elements=string

A list of user names or CRNs or a single user name/CRN.

If no user name or CRN is provided, all users are returned.

Mutually exclusive with current_user.

profile

string

If provided, the CDP SDK will use this value as its profile.

verify_endpoint_tls

aliases: endpoint_tls

boolean

Verify the TLS certificates for the CDP endpoint.

Choices:

  • false

  • true ← (default)

Examples

# Note: These examples do not set authentication details.

# List basic information about all Users
- cloudera.cloud.iam_user_info:

# Gather detailed information about a named User
- cloudera.cloud.iam_info:
    name: Example

# Gather detailed information about a named User
- cloudera.cdp.iam_info:
    filter:
        workloadUsername: my[0-9]{2}_admin.*?'

# Gather detailed information about the current user
- cloudera.cloud.iam_info:
    current_user: yes

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

sdk_out

string

Returns the captured CDP SDK log.

Returned: when supported

sdk_out_lines

list / elements=string

Returns a list of each line of the captured CDP SDK log.

Returned: when supported

users

list / elements=dictionary

The information about the current or named User or Users

Returned: always

accountAdmin

boolean

Whether the user is an administrator of their CDP account.

Returned: on success

creationDate

string

The date when this user record was created.

Returned: on success

Sample: "2020-07-06T12:24:05.531000+00:00"

crn

string

The CRN of the user.

Returned: on success

email

string

The user’s email address.

Returned: on success

firstName

string

The user’s first name.

Returned: on success

identityProviderCrn

string

The identity provider that the user belongs to. It can be “Cloudera-Default”, “Cloudera-Administration”, or a customer-defined identity provider.

Returned: on success

lastInteractiveLogin

string

The date of the user’s last interactive login.

Returned: when supported

Sample: "2020-08-04T16:57:37.808000+00:00"

lastName

string

The user’s last name.

Returned: on success

userId

string

The stable, unique identifier of the user.

Returned: on success

Sample: "f2e7cd8a-4c2d-41b5-92e9-784255c25b7d"

workloadUsername

string

The username used in all the workload clusters of the user.

Returned: when supported

Sample: "u_023"

Authors

  • Webster Mudge (@wmudge)

  • Dan Chaffelson (@chaffelson)