Fix installing certbot on CentOS Stream 8

This commit is contained in:
Emilia 2022-05-17 21:57:12 +02:00 committed by GitHub
parent eb4647ed9c
commit 384e795523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,8 +7,6 @@
name: dnf-plugins-core name: dnf-plugins-core
state: present state: present
- block:
- name: Enable DNF module for CentOS 8.3+. - name: Enable DNF module for CentOS 8.3+.
shell: | shell: |
dnf config-manager --set-enabled powertools dnf config-manager --set-enabled powertools
@ -16,8 +14,7 @@
warn: false warn: false
register: dnf_module_enable register: dnf_module_enable
changed_when: false changed_when: false
when: ansible_facts['distribution_version'] is version('8.3', '>=') or ansible_facts['distribution_release'] == 'Stream'
when: ansible_facts['distribution_version'] is version('8.3', '>=')
- name: Enable DNF module for CentOS 8.08.2. - name: Enable DNF module for CentOS 8.08.2.
shell: | shell: |
@ -26,8 +23,16 @@
warn: false warn: false
register: dnf_module_enable register: dnf_module_enable
changed_when: false changed_when: false
when: ansible_facts['distribution_version'] is version('8.2', '<=') and ansible_facts['distribution_release'] != 'Stream'
when: ansible_facts['distribution_version'] is version('8.2', '<=') - name: Enable EPEL on CentOS 8.
yum:
name:
- epel-release
state: present
register: dnf_module_enable
changed_when: false
when: ansible_facts['distribution_release'] == 'Stream'
when: when:
- ansible_distribution == 'CentOS' - ansible_distribution == 'CentOS'