Skip to content

Commit 09c8986

Browse files
committed
Issue #107: PowerTools required to install via package on CentOS 8.
1 parent 60d805f commit 09c8986

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

.yamllint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
extends: default
3+
34
rules:
45
line-length:
56
max: 120
67
level: warning
8+
9+
ignore: |
10+
.github/stale.yml

tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
- import_tasks: include-vars.yml
33

4+
- import_tasks: setup-RedHat.yml
5+
when: ansible_os_family == 'RedHat'
6+
47
- import_tasks: install-with-package.yml
58
when: not certbot_install_from_source
69

tasks/setup-RedHat.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
# 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+
- name: Enable DNF module for CentOS 8+.
11+
shell: |
12+
dnf config-manager --set-enabled PowerTools
13+
args:
14+
warn: false
15+
register: dnf_module_enable
16+
changed_when: false
17+
18+
when:
19+
- ansible_os_family == 'RedHat'
20+
- ansible_distribution_major_version | int >= 8

0 commit comments

Comments
 (0)