powertools: More robust check if repo is enabled
This commit is contained in:
parent
c156481c50
commit
20634cb959
1 changed files with 5 additions and 3 deletions
|
@ -2,8 +2,10 @@
|
|||
- name: check if repository is enabled
|
||||
command:
|
||||
argv:
|
||||
- cat
|
||||
- /etc/yum.repos.d/CentOS-Linux-PowerTools.repo
|
||||
- dnf
|
||||
- config-manager
|
||||
- --dump
|
||||
- powertools
|
||||
changed_when: false
|
||||
register: result
|
||||
|
||||
|
@ -15,4 +17,4 @@
|
|||
- --set-enabled
|
||||
- powertools
|
||||
warn: false
|
||||
when: "'enabled=1' not in result.stdout_lines"
|
||||
when: "'enabled = 1' not in result.stdout_lines"
|
||||
|
|
Loading…
Add table
Reference in a new issue