Skip to content

Commit

Permalink
add an option to enable ResilientStorage rpm repo
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjelinek committed Oct 31, 2023
1 parent 8d7625b commit bff968a
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ boolean, default: `true`

RHEL and CentOS only, enable repositories containing needed packages

#### `ha_cluster_enable_repos_resilient_storage`

boolean, default: `false`

RHEL and CentOS only, enable repositories containing resilient storage
packages, such as dlm or gfs2. For this option to take effect,
`ha_cluster_enable_repos` must be set to `true`.

#### `ha_cluster_manage_firewall`

boolean, default: false
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ha_cluster_pacemaker_shell: pcs

ha_cluster_enable_repos: true
ha_cluster_enable_repos_resilient_storage: false

ha_cluster_cluster_present: true

Expand Down
5 changes: 4 additions & 1 deletion tasks/enable-repositories/CentOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
command:
cmd: dnf config-manager --set-enabled {{ item.id | quote }}
loop: "{{ __ha_cluster_repos }}"
when: item.name not in __ha_cluster_repolist.stdout
when:
- item.id not in __ha_cluster_repolist.stdout
- item.name != "ResilientStorage"
or ha_cluster_enable_repos_resilient_storage
changed_when: item.name not in __ha_cluster_repolist.stdout
5 changes: 4 additions & 1 deletion tasks/enable-repositories/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
- name: Enable RHEL repositories
command: subscription-manager repos --enable {{ item.id | quote }}
loop: "{{ __ha_cluster_repos }}"
when: item.name not in __ha_cluster_repolist.stdout
when:
- item.id not in __ha_cluster_repolist.stdout
- item.name != "Resilient Storage"
or ha_cluster_enable_repos_resilient_storage
changed_when: item.name not in __ha_cluster_repolist.stdout
2 changes: 2 additions & 0 deletions vars/CentOS_8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
__ha_cluster_repos:
- id: ha
name: HighAvailability
- id: resilientstorage
name: ResilientStorage
12 changes: 12 additions & 0 deletions vars/CentOS_9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: MIT
---
# Put internal variables here with CentOS 9 specific values.

# List of repositories holding HA cluster packages.
# id: repo ID used to enable the repo
# name: user-friendly name of a repo used to check if the repo is enabled
__ha_cluster_repos:
- id: highavailability
name: HighAvailability
- id: resilientstorage
name: ResilientStorage
2 changes: 2 additions & 0 deletions vars/RedHat_8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
__ha_cluster_repos:
- id: rhel-8-for-{{ ansible_architecture }}-highavailability-rpms
name: High Availability
- id: rhel-8-for-{{ ansible_architecture }}-resilientstorage-rpms
name: Resilient Storage
2 changes: 2 additions & 0 deletions vars/RedHat_9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
__ha_cluster_repos:
- id: rhel-9-for-{{ ansible_architecture }}-highavailability-rpms
name: High Availability
- id: rhel-9-for-{{ ansible_architecture }}-resilientstorage-rpms
name: Resilient Storage

0 comments on commit bff968a

Please sign in to comment.