Skip to content

Commit

Permalink
Add support for AlmaLinux 8.3/8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejHome committed Jun 26, 2021
1 parent 5ef010c commit 0131050
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ha-cluster-pacemaker
=========

Role for configuring and expanding basic pacemaker cluster on CentOS/RHEL 6/7/8, Fedora 31/32/33 and CentOS 8 Stream systems.
Role for configuring and expanding basic pacemaker cluster on CentOS/RHEL 6/7/8, AlmaLinux 8, Fedora 31/32/33 and CentOS 8 Stream systems.

This role can configure following aspects of pacemaker cluster:
- enable needed system repositories
Expand Down Expand Up @@ -131,7 +131,7 @@ Role Variables
cluster_configure_stonith_style: 'one-device-per-node'
```
- (RHEL/CentOS) enable the repositories containing needed packages
- (RHEL/CentOS/AlmaLinux) enable the repositories containing needed packages
```
enable_repos: true
```
Expand Down
21 changes: 21 additions & 0 deletions tasks/almalinux_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
- name: get list of active repositories
command: yum repolist
args:
warn: false
register: yum_repolist
changed_when: false
check_mode: false

- name: enable highavailability repository (AlmaLinux 8.3+)
ini_file:
dest: '/etc/yum.repos.d/almalinux-ha.repo'
section: 'ha'
option: 'enabled'
value: '1'
create: 'no'
mode: '0644'
when: >-
'HighAvailability' not in yum_repolist.stdout
and enable_repos | bool
and ansible_distribution_major_version in ['8']
2 changes: 1 addition & 1 deletion tasks/install_normal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: 'libselinux-python'
state: 'installed'
when:
- not (ansible_distribution in ['RedHat','CentOS'] and ansible_distribution_major_version == '8')
- not (ansible_distribution in ['RedHat','CentOS','AlmaLinux'] and ansible_distribution_major_version == '8')
- not (ansible_distribution == 'Fedora' and ansible_distribution_major_version >= '31')

- name: Install Pacemaker cluster packages to all nodes
Expand Down
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@
enabled: true
state: 'started'

- name: Setup firewall for RHEL/CentOS systems
- name: Setup firewall for RHEL/CentOS/AlmaLinux systems
include_tasks: "firewall-el{{ ansible_distribution_major_version }}.yml"
when:
- cluster_firewall|bool
- ansible_distribution == 'RedHat' or ansible_distribution == 'CentOS'
- ansible_distribution in ['RedHat','CentOS','AlmaLinux']

- name: Setup firewall for Fedora systems
include_tasks: "firewall-fedora.yml"
Expand Down

0 comments on commit 0131050

Please sign in to comment.