community.general.pacemaker_cluster (8.5.0) — module

Manage pacemaker clusters

Authors: Mathieu Bultel (@matbu)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This module can manage a pacemaker cluster and nodes from Ansible using the pacemaker cli.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Set cluster Online
  hosts: localhost
  gather_facts: false
  tasks:
  - name: Get cluster state
    community.general.pacemaker_cluster:
      state: online

Inputs

    
node:
    description:
    - Specify which node of the cluster you want to manage. None == the cluster status
      itself, 'all' == check the status of all nodes.
    type: str

force:
    default: true
    description:
    - Force the change of the cluster state
    type: bool

state:
    choices:
    - cleanup
    - offline
    - online
    - restart
    description:
    - Indicate desired state of the cluster
    type: str

timeout:
    default: 300
    description:
    - Timeout when the module should considered that the action has failed
    type: int

Outputs

changed:
  description: true if the cluster state has changed
  returned: always
  type: bool
out:
  description: The output of the current state of the cluster. It return a list of
    the nodes state.
  returned: always
  sample: 'out: [["  overcloud-controller-0", " Online"]]}'
  type: str
rc:
  description: exit code of the module
  returned: always
  type: bool