cloudera.cloud.opdb module – Create or destroy CDP OpDB Databases

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

Synopsis

  • Create or destroy CDP OpDB Databases

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

delay

aliases: polling_delay

integer

The internal polling interval (in seconds) while the module waits for the OpDB Database to achieve the declared state.

Default: 15

environment

aliases: env

string / required

The name of the Environment in which to find or place the OpDB Databases.

Required with name

name

aliases: database

string / required

If a name is provided, that OpDB Database will be created or dropped.

environment must be provided

profile

string

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

state

string

The declarative state of the OpDB Database

Choices:

  • "present" ← (default)

  • "absent"

timeout

aliases: polling_timeout

integer

The internal polling timeout (in seconds) while the module waits for the OpDB Database to achieve the declared state.

Default: 3600

verify_endpoint_tls

aliases: endpoint_tls

boolean

Verify the TLS certificates for the CDP endpoint.

Choices:

  • false

  • true ← (default)

wait

boolean

Flag to enable internal polling to wait for the Opdb Database to achieve the declared state.

If set to FALSE, the module will return immediately.

Choices:

  • false

  • true ← (default)

Examples

# Note: These examples do not set authentication details.

# Create an OpDB Database
- cloudera.cloud.opdb:
    name: example-database
    env: example-environment

# Remove an OpDB Database
- cloudera.cloud.opdb:
    name: example-database
    env: example-environment
    state: absent

Return Values

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

Key

Description

database

dictionary

The information about the Created Database

Returned: always

creationDate

string

The creation time of the database in UTC.

Returned: present

creatorCrn

string

The CRN of the database creator.

Returned: present

crn

string

The database’s crn.

Returned: present

databaseName

string

The name of the database.

Returned: present

dbVersion

string

The version of the Database.

Returned: present

environmentCrn

string

The crn of the database’s environment.

Returned: present

environmentName

boolean

The name of the Database’s environment

Returned: present

hueEndpoint

string

The Hue endpoint for the Database.

Returned: present

internalName

string

Internal cluster name for this database

Returned: present

status

string

The status of the Database

Returned: always

storageLocation

string

HBase cloud storage location

Returned: present

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

Authors

  • Dan Chaffelson (@chaffelson)