W3cubDocs

/Ansible

pacemaker_cluster - Manage a pacemaker cluster

New in version 2.3.

Synopsis

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

Requirements (on host that executes module)

  • python >= 2.6

Options

parameter required default choices comments
force
no True
Force the change of the cluster state
node
no None
Specify which node of the cluster you want to manage. None == the cluster status itself, 'all' == check the status of all nodes.
state
yes
  • online
  • offline
  • restart
  • cleanup
Indicate desired state of the cluster
timeout
no 300
Timeout when the module should considered that the action has failed

Examples

---
- name: Set cluster Online
  hosts: localhost
  gather_facts: no
  tasks:
    - name: get cluster state
      pacemaker_cluster: state=online

Return Values

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

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

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/pacemaker_cluster_module.html