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
|
- name: check if repository is enabled
|
||||||
command:
|
command:
|
||||||
argv:
|
argv:
|
||||||
- cat
|
- dnf
|
||||||
- /etc/yum.repos.d/CentOS-Linux-PowerTools.repo
|
- config-manager
|
||||||
|
- --dump
|
||||||
|
- powertools
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
|
@ -15,4 +17,4 @@
|
||||||
- --set-enabled
|
- --set-enabled
|
||||||
- powertools
|
- powertools
|
||||||
warn: false
|
warn: false
|
||||||
when: "'enabled=1' not in result.stdout_lines"
|
when: "'enabled = 1' not in result.stdout_lines"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue