Skip to content

Commit

Permalink
Merge pull request #5 from jrosser/patch-1
Browse files Browse the repository at this point in the history
Add compatibility with centos-9
  • Loading branch information
noonedeadpunk committed Jun 15, 2022
2 parents 82badde + 90b5fb4 commit dacff1e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tasks/pacemaker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
---

- name: Ensure config-manager is present for dnf
package:
name: dnf-plugins-core
state: present
when:
- ansible_os_family | lower == 'redhat'
- ansible_distribution_major_version is version('8', '>=')

- name: Enable HighAvailability repository
command: dnf config-manager --enable ha
command: "dnf config-manager --enable {{ _centos_ha_repo_name[ansible_facts['distribution_major_version']] }}"
changed_when: false
args:
warn: false
when:
- ansible_os_family | lower == 'redhat'
- ansible_distribution_major_version is version('8', '=')

- name: Installs corosync
package:
Expand Down
4 changes: 4 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---

_pacemaker_remote_group_exists: "{{ (pacemaker_remote_group is defined and pacemaker_remote_group in groups) }}"

_centos_ha_repo_name:
'8': ha
'9': highavailability

0 comments on commit dacff1e

Please sign in to comment.