community.cassandra.cassandra_removenode (1.3.3) — module

Removes a node by the given host id from the cluster.

Authors: Rhys Campbell (@rhysmeister)

Install collection

Install with ansible-galaxy collection install community.cassandra:==1.3.3


Add to requirements.yml

  collections:
    - name: community.cassandra
      version: 1.3.3

Description

Removes a node by the given host id from the cluster.

Identify the node by the host id as given in nodetool status output.

The nodetool status command is used to determine if the host_id exists in the cluster.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Decommission a node
  community.cassandra.cassandra_removenode:
    host_id: "2d29b2bc-faa5-4837-935c-41c3945119e2"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Force removal of a node
  community.cassandra.cassandra_removenode:
    host_id: "07a8a3b1-98e7-4ed9-8481-b328489ad711"
    force: yes

Inputs

    
host:
    aliases:
    - login_host
    default: 127.0.0.1
    description:
    - The hostname.
    type: str

port:
    aliases:
    - login_port
    default: 7199
    description:
    - The Cassandra TCP port.
    type: int

debug:
    default: false
    description:
    - Add additional debug to module output.
    type: bool

force:
    default: false
    description:
    - Forces completion of the pending removal.
    type: bool

host_id:
    description:
    - Host Id of the node to rmeove.
    required: true
    type: str

password:
    aliases:
    - login_password
    description:
    - The password to authenticate with.
    type: str

username:
    aliases:
    - login_user
    description:
    - The username to authenticate with.
    type: str

nodetool_path:
    description:
    - The path to nodetool.
    type: str

password_file:
    aliases:
    - login_password_file
    description:
    - Path to a file containing the password.
    type: str

nodetool_flags:
    default: -Dcom.sun.jndi.rmiURLParsing=legacy
    description:
    - Flags to pass to nodetool.
    type: str

Outputs

msg:
  description: A message indicating what has happened.
  returned: always
  type: bool
rc:
  description: Return code of executed command
  returned: on failure
  type: int