cloudera.cluster.data_context module – Create, update, or delete a data context
Note
This module is part of the cloudera.cluster collection (version 5.0.0).
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.cluster
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: cloudera.cluster.data_context
.
New in cloudera.cluster 5.0.0
Synopsis
Configure details of a specific data context.
Create a new data context.
Update an existing data context.
Delete a data context.
The module supports
check_mode
.
Requirements
The below requirements are needed on the host that executes this module.
cm-client >= 54
Parameters
Parameter |
Comments |
---|---|
Set the HTTP user agent header when interacting with the CM API endpoint. Default: |
|
The name of the Cloudera Manager cluster. |
|
Capture the HTTP interaction logs with the CM API endpoint. Choices:
|
|
Flag to force TLS during CM API endpoint discovery. If Choices:
|
|
Hostname of the CM API endpoint. If set, the Mutually exclusive with url. |
|
The name of the data context. |
|
Password for access to the CM API endpoint. This parameter is set to |
|
Port of the CM API endpoint. If set, CM API endpoint discovery will connect to the designated port first and will follow redirects. Default: |
|
Set the HTTP/S proxy server when interacting with the CM API endpoint. |
|
A list of services that the data context will include. |
|
Path to SSL CA certificate to use for validation. |
|
If state=present, the data context will be created or updated. If state=absent, the data context will be deleted Choices:
|
|
The CM API endpoint URL and should include scheme, host, port, and API root path. Mutually exclusive with host. |
|
Username for access to the CM API endpoint. |
|
Verify the TLS certificates for the CM API endpoint. Choices:
|
|
API version of the CM API endpoint. Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platforms: |
Target OS/families that can be operated against |
Examples
- name: Create a Data Context
cloudera.cluster.data_context:
host: example.cloudera.com
username: "jane_smith"
password: "S&peR4Ec*re"
name: "base_services"
cluster: "example_cluster"
services: ['hive', 'atlas', 'hdfs', 'ranger']
state: present
- name: Delete a data context
cloudera.cluster.data_context:
host: example.cloudera.com
username: "jane_smith"
password: "S&peR4Ec*re"
name: "base_services"
state: absent
- name: Update an existing data context
cloudera.cluster.data_context:
host: example.cloudera.com
username: "jane_smith"
password: "S&peR4Ec*re"
name: "base_services"
cluster: "example_cluster"
services: ['hive', 'atlas', 'hdfs']
state: present
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary containing details of data contexts within the cluster. Returned: always |
|
The list of allowed cluster versions within data context. Returned: always |
|
Status of the client configuration within data context. Returned: always |
|
Status of the configuration within data context. Returned: always |
|
The timestamp indicating when the data context was created. Returned: always |
|
The display name of the data context. Returned: always |
|
The health status of the data context. Returned: always |
|
The timestamp indicating the last modification of the data context. Returned: always |
|
The name of the data context. Returned: always |
|
The name service that data context belongs to. Returned: always |
|
The list of services associated with data context. Returned: always |
|
The list of supported services types within data context. Returned: always |