Skip to content

Commit dacff1e

Browse files
Merge pull request #5 from jrosser/patch-1
Add compatibility with centos-9
2 parents 82badde + 90b5fb4 commit dacff1e

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tasks/pacemaker.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
---
22

3+
- name: Ensure config-manager is present for dnf
4+
package:
5+
name: dnf-plugins-core
6+
state: present
7+
when:
8+
- ansible_os_family | lower == 'redhat'
9+
- ansible_distribution_major_version is version('8', '>=')
10+
311
- name: Enable HighAvailability repository
4-
command: dnf config-manager --enable ha
12+
command: "dnf config-manager --enable {{ _centos_ha_repo_name[ansible_facts['distribution_major_version']] }}"
513
changed_when: false
614
args:
715
warn: false
816
when:
917
- ansible_os_family | lower == 'redhat'
10-
- ansible_distribution_major_version is version('8', '=')
1118

1219
- name: Installs corosync
1320
package:

vars/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
---
22

33
_pacemaker_remote_group_exists: "{{ (pacemaker_remote_group is defined and pacemaker_remote_group in groups) }}"
4+
5+
_centos_ha_repo_name:
6+
'8': ha
7+
'9': highavailability

0 commit comments

Comments
 (0)