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 |
---|---|
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 |
---|---|
Name (substring) of the Datahub definition to filter the resulting matches |
|
Whether to return the full entry for the matching Datahub definitions Choices:
|
|
Category of the Datahub definition to filter Choices:
|
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)
andquery('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 |
---|---|
List of lists of Datahub definition Returned: success |