OndrejHome.pcs-modules-2
pcs-modules-2
Ansible modules to set up a Pacemaker cluster on CentOS/RHEL (versions 6, 7, 8) and Fedora (versions 31 to 35).
Supported PCS Versions:
- pcs-0.9
- pcs-0.10
- pcs-0.11 (initial support)
If you need a solution to configure a basic Pacemaker cluster on CentOS/RHEL or Fedora systems, check out the ondrejhome.ha-cluster-pacemaker role that uses pcs-modules-2.
Important: The modules that change cluster settings, like pcs_resource
, pcs_constraint_*
, pcs_property
, pcs_resource_defaults
, and pcs_stonith_level
, should only be run from one node in the cluster. Use either run_once: True
or delegate_to:
for this.
Requirements
For RHEL: Machines should already be registered and subscribed to 'High Availability' or 'Resilient Storage' channels.
Role Variables
There are no specific role variables. This role is meant to be added as a dependency.
Provided Modules
- pcs_auth - Manage authorization of nodes in the cluster
- pcs_resource - Create, update, or delete cluster resources, including stonith resources
- pcs_constraint_location - Manage location constraints in the cluster
- pcs_constraint_colocation - Manage colocation constraints in the cluster
- pcs_constraint_order - Manage order constraints in the cluster
- pcs_cluster - Create or destroy a Pacemaker cluster and manage nodes
- pcs_property - Set or unset cluster properties
- pcs_resource_defaults - Set or unset defaults for resources and their operations
- pcs_quorum_qdevice - Create or delete a qdevice in the cluster
- pcs_stonith_level - Create or delete stonith levels in the cluster
- detect_pacemaker_cluster - Collect information about the cluster, specifically the nodes
Example Playbook
Here’s a simple example of how to include these modules in your playbook:
- hosts: servers
roles:
- { role: ondrejhome.pcs-modules-2 }
Use the command ansible-doc
to find more details about each module and to see usage examples:
ansible-doc -M library/ pcs_resource
Known Issues and Limitations
On EL7, the RRP feature is limited to 2 links. If you try to add more than 2, you might see the following message:
pcs_cluster
will only consider 2 links and ignore any additional ones to prevent errors. If you're on a platform withpcs-0.9
that allows 3 or more links, feel free to report it and share the details.[MAIN ] parse error in config: interface ring number 2 is bigger than allowed maximum 1
License
Licensed under GPLv3 or Apache License 2.0. Check the LICENSE file for details.
Author Information
WARNING: Although the author uses these modules regularly, they have only been manually tested.
To contact the author, you can email ondrej-xa2iel8u@famera.cz or create an issue on GitHub for feature requests.
ansible-galaxy install OndrejHome.pcs-modules-2