cloudera.cluster.host module – Manage hosts within Cloudera Manager
Note
This module is part of the cloudera.cluster collection (version 4.4.0).
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.host
.
Synopsis
Allows for the management of hosts within the Cloudera Manager.
It provides functionalities to create, delete, attach, or detach host instance from a cluster.
Requirements
The below requirements are needed on the host that executes this module.
cm_client
Parameters
Parameter |
Comments |
---|---|
Set the HTTP user agent header when interacting with the CM API endpoint. Default: |
|
The name of the host. |
|
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 ip of the host. |
|
The name of the CM Cluster. |
|
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. |
|
The rack ID for this host. |
|
Path to SSL CA certificate to use for validation. |
|
State of the host. 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 |
|
Support: none |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platforms: all |
Target OS/families that can be operated against |
Examples
---
- name: Create a host
cloudera.cluster.host:
host: "example.cloudera.host"
username: "will_jordan"
password: "S&peR4Ec*re"
rack_id: "/default"
cluster_hostname: "Ecs_node_01"
host_ip: "10.9.8.7"
state: "present"
- name: Attach a host to the Cluster
cloudera.cluster.host:
host: "example.cloudera.host"
username: "will_jordan"
name: "Base_Edge2AI_Node"
password: "S&peR4Ec*re"
cluster_hostname: "Ecs_node_01"
state: "attached"
- name: Detach a host to the Cluster
cloudera.cluster.host:
host: "example.cloudera.host"
username: "will_jordan"
name: "Base_Edge2AI_Node"
password: "S&peR4Ec*re"
cluster_hostname: "Ecs_node_01"
state: "detached"
- name: Remove a host
cloudera.cluster.host:
host: "example.cloudera.host"
username: "will_jordan"
password: "S&peR4Ec*re"
cluster_hostname: "Ecs_node_01"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Details about Cloudera Manager Host Returned: success |
|
A reference to the enclosing cluster. Returned: optional |
|
Represents the Commission state of an entity. Returned: optional |
|
OS distribution details. Returned: optional |
|
The single value used by the Cloudera Manager UI to represent the status of the entity. Returned: optional |
|
Represents a result from a health test performed by Cloudera Manager for an entity. Returned: optional |
|
The summary status of health check. Returned: optional |
|
A unique host identifier. This is not the same as the hostname (FQDN). It is a distinct value that remains the same even if the hostname changes. Returned: optional |
|
A URL into the Cloudera Manager web UI for this specific host. Returned: optional |
|
The hostname. This field is not mutable after the initial creation. Returned: optional |
|
The host IP address. This field is not mutable after the initial creation. Returned: optional |
|
Time when the host agent sent the last heartbeat. Returned: optional |
|
Maintance mode of Cloudera Manager Service. Returned: optional |
|
List of Maintance owners for Cloudera Manager Service. Returned: optional |
|
The number of logical CPU cores on this host. Returned: optional |
|
The number of physical CPU cores on this host. Returned: optional |
|
The rack ID for this host. Returned: optional |
|
The list of roles assigned to this host. Returned: optional |
|
Tags associated with the host. Returned: optional |
|
he amount of physical RAM on this host, in bytes. Returned: optional |
Authors
Ronald Suplina (@rsuplina)
Collection links