cloudera.cloud.datahub_cluster_recipe module – Manage CDP Datahub recipes on an instance group

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

Synopsis

  • Create, update, and delete CDP Datahub recipes to an instance group of a CDP Datahub.

  • A recipe is a script that runs on all nodes of a specified instance group of a Datahub.

  • See the Cloudera documentation on recipes for details.

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"

datahub

string / required

The name or CRN of the datahub.

debug

aliases: debug_endpoints

boolean

Capture the CDP SDK debug log.

Choices:

  • false ← (default)

  • true

name

aliases: instance_group, group

string / required

The name of the CDP Datahub instance group.

profile

string

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

recipes

list / elements=string / required

A list of recipes for the CDP Datahub instance group.

To remove all recipes from the instance group, declare an empty list.

verify_endpoint_tls

aliases: endpoint_tls

boolean

Verify the TLS certificates for the CDP endpoint.

Choices:

  • false

  • true ← (default)

Notes

Note

  • This module supports check_mode.

  • If the existing recipe is different than the declared state, the recipe is recreated and assigned a new CRN.

Examples

# Note: These examples do not set authentication details.

- name: Set a couple of recipes to an instance group
  cloudera.cloud.datahub_cluster_recipe:
    datahub: example-datahub
    name: core_broker
    recipes:
      - recipe01
      - recipe02

- name: Reset the recipes to an instance group (will remove recipe01 from above)
  cloudera.cloud.datahub_cluster_recipe:
    datahub: example-datahub
    name: core_broker
    recipes:
      - recipe02

- name: Remove all recipes of an instance group
  cloudera.cloud.datahub_cluster_recipe:
    datahub: example-datahub
    name: core_broker
    recipes: []

Return Values

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

Key

Description

instance_group

dictionary

The recipe state for the CDP Datahub instance group.

Returned: always

attached_recipes

list / elements=string

List of recipes attached to the instance group.

Returned: always

datahub

string

Name of the CDP Datahub.

Returned: always

detached_recipes

list / elements=string

List of recipes detached from the instance group.

Returned: always

name

string

Name of the instance group in the CDP Datahub.

Returned: always

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

  • Webster Mudge (@wmudge)