chanchalbose.hacluster

ansible-hacluster

This role sets up a two-node high availability (HA) cluster using pcs, pacemaker, and corosync.

Requirements

The code has been partially tested on RHEL 7, and the version for Debian is still in development. The fencing device setup instructions in virtfence.yml are just suggestions, so please adjust them as needed. Some parts of the code are still being tested, and we’ve marked any unsafe code with comments.

Role Variables

You need to set the following variables in defaults/main.yml to match your environment:

  • hacluster_password: Change_Me
  • pcs_cluster1: set_an_ip1
  • pcs_cluster2: set_an_ip2
  • cluster_name: set_name
  • virt_fencing: false
  • ip_of_esxi: set_esxi_or_vcenter_ip
  • sxi_username: set_esxi_or_vcenter_username
  • sxi_password: set_esxi_or_vcenter_password

The tasks in virtfence.yml will be disabled if virt_fencing is set to false.

Dependencies

Currently, there are no dependencies. However, I plan to split the fencing code into its own role in the future.

Example Playbook

Here’s an example playbook to test this role:

---
- hosts: ['node1','node2']
  become: true
  remote_user: vagrant
  roles:
    - { role: ansible-hacluster, pcs_cluster1: node1, pcs_cluster2: node2, create_cluster: mycluster }

License

BSD

Author Information

Chanchal Bose
Company: Prodevans LLC
GitHub repo: chanchalbose
Docker repo: Chanchal
YouTube Channel: mostlylinux

Informazioni sul progetto

Deploy HA Cluster using pcs, pacemaker and corosync on Redhat 7

Installa
ansible-galaxy install chanchalbose.hacluster
Licenza
Unknown
Download
105
Proprietario