cloudera.cloud.datahub_instance lookup – Get the instances for a CDP Public Cloud Datahub
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_instance
.
Synopsis
Allows you to retrieve the instances by one or more instance groups for a CDP Public Cloud Datahub.
If the Datahub is not found or is ambigious, the lookup will return an error.
If the instance group is not found, the lookup will return the
default
value.
Terms
Parameter |
Comments |
---|---|
Instance group 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_instance', key1=value1, key2=value2, ...)
and query('cloudera.cloud.datahub_instance', key1=value1, key2=value2, ...)
Parameter |
Comments |
---|---|
Name of the Datahub |
|
What return when the instance group is not found on the Datahub Default: |
|
Whether to return the full entry for the matching Datahub instance group Choices:
|
Notes
Note
When keyword and positional parameters are used together, positional parameters must be listed before keyword parameters:
lookup('cloudera.cloud.datahub_instance', term1, term2, key1=value1, key2=value2)
andquery('cloudera.cloud.datahub_instance', term1, term2, key1=value1, key2=value2)
Requires
cdpy
.
See Also
See also
- cloudera.cloud.datahub_cluster_info
Cloudera CDP Public Cloud Datahub cluster module
Examples
- name: Retrieve the instances for the NiFi instance group for a CDP Public Cloud Flow Management datahub
ansible.builtin.debug:
msg: "{{ query('cloudera.cloud.datahub_instance', 'nifi', datahub='example-flow-dh') }}"
- name: Retrieve the full details for the instance
ansible.builtin.debug:
msg: "{{ query('cloudera.cloud.datahub_instance', 'nifi', datahub='example-flow-dh', detailed=True) }}"
- name: Retrieve the instance details for multiple instance groups
ansible.builtin.debug:
msg: "{{ lookup('cloudera.cloud.datahub_instance', ['nifi', 'management'], datahub='example-flow-dh', wantlist=True) }}"
Return Value
Key |
Description |
---|---|
List of lists of instances Returned: success |