cloudera.cloud.datahub_definition lookup – Get a Datahub definition for a CDP Public Cloud Environment

Note

This lookup plugin 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.datahub_definition.

Synopsis

  • Allows you to retrieve the Datahub definition matching the Datalake CDH cloud platform and Runtime for one or more CDP Public Cloud Environments.

  • If an Environment is not found or is ambigious, the lookup will return an error.

Terms

Parameter

Comments

Terms

string / required

A CDP Public Cloud Environment name

Keyword parameters

This describes keyword parameters of the lookup. These are the values key1=value1, key2=value2 and so on in the following examples: lookup('cloudera.cloud.datahub_definition', key1=value1, key2=value2, ...) and query('cloudera.cloud.datahub_definition', key1=value1, key2=value2, ...)

Parameter

Comments

definition

string

Name (substring) of the Datahub definition to filter the resulting matches

detailed

boolean

Whether to return the full entry for the matching Datahub definitions

Choices:

  • false ← (default)

  • true

type

string

Category of the Datahub definition to filter

Choices:

  • "OPERATIONALDATABASE"

  • "FLOW_MANAGEMENT"

  • "DATAMART"

  • "DISCOVERY_DATA_AND_EXPLORATION"

  • "DATAENGINEERING"

  • "STREAMING"

  • "OTHER"

Notes

Note

  • When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters: lookup('cloudera.cloud.datahub_definition', term1, term2, key1=value1, key2=value2) and query('cloudera.cloud.datahub_definition', term1, term2, key1=value1, key2=value2)

  • Requires cdpy.

  • If you encounter worker found in a dead state and are running OSX, set the environment variable, OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES.

See Also

See also

cloudera.cloud.datahub_definition_info

Cloudera CDP Public Cloud Datahub definition module

Examples

- name: Retrieve the Datahub definition for a single CDP Public Cloud Environment
  ansible.builtin.debug:
    msg: "{{ query('cloudera.cloud.datahub_definition', 'example-env') }}"

- name: Retrieve the Datahub definition that match the given substring
  ansible.builtin.debug:
    msg: "{{ query('cloudera.cloud.datahub_definition', 'example-env', definition='Flow Management Light Duty') }}"

- name: Retrieve the only streaming Datahub definition
  ansible.builtin.debug:
    msg: "{{ query('cloudera.cloud.datahub_definition', 'example-env', type='STREAMING') }}"

- name: Retrieve the full details for the Datahub definition
  ansible.builtin.debug:
    msg: "{{ query('cloudera.cloud.datahub_definition', 'example-env', detailed=True) }}"

- name: Retrieve the Datahub definition details for multiple CDP Public Cloud Environments
  ansible.builtin.debug:
    msg: "{{ lookup('cloudera.cloud.datahub_definition', ['example-env', 'another-env'], wantlist=True) }}"

Return Value

Key

Description

Return value

list / elements=complex

List of lists of Datahub definition

Returned: success

Authors

  • Webster Mudge (@wmudge)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.