cloudera.cluster.cm_service module – Manage Cloudera Manager service roles

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.cm_service.

Synopsis

  • Create or remove one or more Cloudera Manager service roles.

  • Start, stop or restart one or more Cloudera Manager service roles.

Requirements

The below requirements are needed on the host that executes this module.

  • cm_client

Parameters

Parameter

Comments

purge

boolean

Delete all current roles and setup only the roles provided

Choices:

  • false ← (default)

  • true

role

list / elements=string / required

A list of one or more service roles to be configured.

state

string

The desired state of roles

Choices:

  • "started" ← (default)

  • "stopped"

  • "absent"

  • "present"

  • "restarted"

Examples

---
- name: Start Cloudera Manager service roles
  cloudera.cluster.cm_version:
    host: "10.10.10.10"
    username: "jane_smith"
    password: "S&peR4Ec*re"
    port: "7180"
    purge: False
    state: "started"
    role: [ "SERVICEMONITOR" , "HOSTMONITOR", "EVENTSERVER", "ALERTPUBLISHER" ]
  register: cm_output

- name: Purge all roles then create and start new roles
  cloudera.cluster.cm_version:
    host: "10.10.10.10"
    username: "jane_smith"
    password: "S&peR4Ec*re"
    port: "7180"
    purge: True
    state: "started"
    role: [ "SERVICEMONITOR" , "HOSTMONITOR", "EVENTSERVER", "ALERTPUBLISHER" ]
  register: cm_output

- name: Stop two Cloudera Manager service  roles
  cloudera.cluster.cm_version:
    host: "10.10.10.10"
    username: "jane_smith"
    password: "S&peR4Ec*re"
    port: "7180"
    state: "stopped"
    role: [ "EVENTSERVER", "ALERTPUBLISHER" ]
  register: cm_output

- name: Remove Cloudera Manager service role
  cloudera.cluster.cm_version:
    host: "10.10.10.10"
    username: "jane_smith"
    password: "S&peR4Ec*re"
    port: "7180"
    purge: False
    state: "absent"
    role: [ "ALERTPUBLISHER" ]
  register: cm_output

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

cloudera_manager

dictionary

List of Cloudera Manager roles

Returned: success

commissionState

string

Commission state of the role.

Returned: optional

configStalenessStatus

string

Status of configuration staleness for Cloudera Manager Role.

Returned: optional

entity_status

string

Health status of entities for Cloudera Manager Role.

Returned: optional

health_checks

dictionary

Lists all available health checks for Cloudera Manager Service.

Returned: optional

health_summary

string

Health of the Cloudera Manager Role.

Returned: optional

hostRef

string

Reference to a host.

Returned: optional

maintenance_mode

boolean

Maintance mode of Cloudera Manager Role.

Returned: optional

maintenance_owners

list / elements=string

List of Maintance owners for Cloudera Manager Service.

Returned: optional

name

string

The Cloudera Manager role name.

Returned: optional

role_instances_url

string

Role instance url for Cloudera Manager Service.

Returned: optional

role_state

string

State of the Cloudera Manager Role.

Returned: optional

roleConfigGroupRef

string

Reference to role config groups.

Returned: optional

service_url

string

Role url for Cloudera Manager Role.

Returned: optional

serviceRef

string

Reference to a service.

Returned: optional

tags

list / elements=string

List of tags for Cloudera Manager Role.

Returned: optional

type

string

The Cloudera Manager role type.

Returned: optional


Authors

  • Ronald Suplina (@rsuplina)

Collection links