sap.sap_operations.pcs_status_info module – Get pacemaker status information

Note

This module is part of the sap.sap_operations collection.

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install sap.sap_operations.

To use it in a playbook, specify: sap.sap_operations.pcs_status_info.

New in sap.sap_operations 1.4.0-galaxy

Synopsis

  • Get pacemaker status information

  • This module will execute command pcs status xml and process results to present them nicely in Ansible

  • If pacemaker is not running, or ansible user does not have authorizations to execution pcs status xml command, module will fail

  • Recommended to use root user

Notes

Note

  • This module is community supported

  • Module interface (parameters, output) expected to be stable but not guaranteed

  • Module planned to be released on Ansible Automation Hub after collecting some feedback

  • There is no guarantee that this module will be officially supported by Red Hat

Examples

- name: Get pacemaker status
  sap.sap_operations.pcs_status_info:
  become: true
  become_user: root

Return Values

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

Key

Description

pacemaker_status

dictionary

Pacemaker status information in a dictionary

Returned: success

Sample: {"crm_mon": {"nodes": [{"node": {"expected_up": "true", "id": "1", "is_dc": "false", "maintenance": "false", "name": "host1", "online": "true", "pending": "false", "resources_running": "0", "shutdown": "false", "standby": "false", "standby_onfail": "false", "type": "member", "unclean": "false"}}, {"node": {"expected_up": "true", "id": "2", "is_dc": "true", "maintenance": "false", "name": "host2", "online": "true", "pending": "false", "resources_running": "0", "shutdown": "false", "standby": "false", "standby_onfail": "false", "type": "member", "unclean": "false"}}], "summary": {"cluster_options": {"maintenance-mode": "false", "no-quorum-policy": "stop", "priority-fencing-delay-ms": "0", "stonith-enabled": "true", "stonith-timeout-ms": "60000", "stop-all-resources": "false", "symmetric-cluster": "true"}, "current_dc": {"id": "2", "name": "host2", "present": "true", "version": "2.1.2-4.el8_6.5-ada5c3b36e2", "with_quorum": "true"}, "last_change": {"client": "crmd", "origin": "host1", "time": "Wed May  3 18:13:41 2023", "user": "hacluster"}, "last_update": {"time": "Thu May  4 09:47:15 2023"}, "nodes_configured": {"number": "2"}, "resources_configured": {"blocked": "0", "disabled": "0", "number": "0"}, "stack": {"type": "corosync"}}, "version": "2.1.2-4.el8_6.5"}}

Authors

  • Kirill Satarin (@kksat)