geerlingguy / ansible-role-certbot

Ansible Role - Certbot (for Let's Encrypt)
https://galaxy.ansible.com/geerlingguy/certbot/
MIT License
781 stars 347 forks source link

PowerTools vs powertools on Centos 8.3 #135

Closed deanhamilton11 closed 3 years ago

deanhamilton11 commented 3 years ago

This task is currently failing for me: Enable DNF module for CentOS 8+ with the following output:

Error: No matching repo to modify: PowerTools.

Contents of my /etc/centos-release:

CentOS Linux release 8.3.2011

Output of sudo dnf repolist

repo id                                                        repo name
appstream                                                      CentOS Linux 8 - AppStream
baseos                                                         CentOS Linux 8 - BaseOS
epel                                                           Extra Packages for Enterprise Linux 8 - x86_64
epel-modular                                                   Extra Packages for Enterprise Linux Modular 8 - x86_64
extras                                                         CentOS Linux 8 - Extras
nginx                                                          nginx repo
powertools                                                     CentOS Linux 8 - PowerTools
remi-modular                                                   Remi's Modular repository for Enterprise Linux 8 - x86_64
remi-safe                                                      Safe Remi's RPM repository for Enterprise Linux 8 - x86_64

I believe that this is happening because the repo name is case sensitive, and it must have changed from PowerTools to powertools in some recent release.

Not sure why that would be, or if its possible for the playbook task to determine the repo name based on the centos version number.

bubebyte commented 3 years ago

I got the same issue today on CentOS Stream 8.

Playbook:

TASK [geerlingguy.certbot : Enable DNF module for CentOS 8+.] *********************************************************************************
fatal: [remote.host]: FAILED! => {"changed": false, "cmd": "dnf config-manager --set-enabled PowerTools\n", "delta": "0:00:00.170299", "end": "2020-12-19 21:21:09.392953", "msg": "non-zero return code", "rc": 1, "start": "2020-12-19 21:21:09.222654", "stderr": "Error: No matching repo to modify: PowerTools.", "stderr_lines": ["Error: No matching repo to modify: PowerTools."], "stdout": "", "stdout_lines": []}

System:

$ cat /etc/redhat-release
CentOS Stream release 8
$ dnf repolist all | grep -i powertools
powertools                         CentOS Linux 8 - PowerTools          disabled
geerlingguy commented 3 years ago

This was just fixed in https://github.com/geerlingguy/ansible-role-certbot/pull/137 — new release will be out soon!