Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add an option to enable Resilient Storage rpm repository #158

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading