geerlingguy/ansible-role-certbot

Task "Enable DNF module for CentOS 8+" fails [PowerTools|powertools]

agno01 opened this issue · 3 comments

Problem:

certbot Ansible role fails when enabling dnf module PowerTools:

TASK [geerlingguy.certbot : Enable DNF module for CentOS 8+.] ********************************************************************************************************************
fatal: [<redacted_hostname>]: FAILED! => changed=false
  cmd: |-
    dnf config-manager --set-enabled PowerTools
  delta: '0:00:00.365425'
  end: '2021-02-09 08:45:59.785283'
  msg: non-zero return code
  rc: 1
  start: '2021-02-09 08:45:59.419858'
  stderr: 'Error: No matching repo to modify: PowerTools.'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

Environment:

CentOS Linux release 8.3.2011
Ansible 2.10.5
geerlingguy.certbot 3.1.0

Cause:

Yum repoid of Power Tools has changed from PowerTools to powertools:

https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2011#Major_Changes

Possible fix:

Add check for CentOS Linux release version.

@agno01 It's fixed on the master, you can use the git commit as the reference instead of the tag. At least this is my workaround until @geerlingguy creates a new release.

stale commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale commented

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.