Skip to content

Commit 78f4cb5

Browse files
committed
Use CRB not powertools on Alma and Rocky.
1 parent d1cbcde commit 78f4cb5

File tree

1 file changed

+9
-28
lines changed

1 file changed

+9
-28
lines changed

tasks/setup-RedHat.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
11
---
22
# See: https://github.com/geerlingguy/ansible-role-certbot/issues/107
3-
- block:
4-
5-
- name: Ensure dnf-plugins are installed on CentOS 8+.
6-
yum:
7-
name: dnf-plugins-core
8-
state: present
9-
10-
- block:
11-
12-
- name: Enable DNF module for CentOS 8.3+.
13-
shell: |
14-
dnf config-manager --set-enabled powertools
15-
register: dnf_module_enable
16-
changed_when: false
17-
18-
when: ansible_facts['distribution_version'] is version('8.3', '>=')
19-
20-
- name: Enable DNF module for CentOS 8.0–8.2.
21-
shell: |
22-
dnf config-manager --set-enabled PowerTools
23-
register: dnf_module_enable
24-
changed_when: false
25-
26-
when: ansible_facts['distribution_version'] is version('8.2', '<=')
27-
28-
when:
29-
- ansible_distribution == 'CentOS'
30-
- ansible_distribution_major_version | int >= 8
3+
- name: Ensure dnf-plugins are installed on Rocky/AlmaLinux.
4+
yum:
5+
name: dnf-plugins-core
6+
state: present
7+
8+
- name: Enable DNF module for Rocky/AlmaLinux.
9+
shell: |
10+
dnf config-manager --set-enabled crb
11+
changed_when: false

0 commit comments

Comments
 (0)