cloudera.cloud.ml_workspace_access module – Grant and revoke user access to CDP Machine Learning Workspaces

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. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: cloudera.cloud.ml_workspace_access.

Synopsis

  • Grant and revoke user access to CDP Machine Learning Workspaces

Requirements

The below requirements are needed on the host that executes this module.

  • cdpy

Parameters

Parameter

Comments

cdp_region

aliases: cdp_endpoint_region, endpoint_region

string

Specify the Cloudera Data Platform endpoint region.

Default: "default"

debug

aliases: debug_endpoints

boolean

Capture the CDP SDK debug log.

Choices:

  • false ← (default)

  • true

environment

aliases: env

string / required

The name of the Environment for the ML Workspace

name

aliases: workspace

string / required

The name of the ML Workspace

profile

string

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

state

string

The declarative state of the access to the ML Workspace

Choices:

  • "present" ← (default)

  • "absent"

user

aliases: identifier

string / required

The cloud provider identifier for the user.

For AWS, this is the User ARN.

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.

# Grant access for user (and register the output to capture the kubeconfig)
- cloudera.cloud.ml_workspace_access:
    name: ml-example
    env: cdp-env
    user: some-cloud-provider-specific-id
  register: access_output

# Revoke access for user
- cloudera.cloud.ml_workspace_acces:
    name: ml-k8s-example
    env: cdp-env
    user: some-cloud-provider-specific-id
    state: absent

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

workspace

dictionary

The information about the user’s access to the ML Workspace

Returned: on success

kubeconfig

string

The kubeconfig file as a string

Returned: always

Authors

  • Webster Mudge (@wmudge)