mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix a scoping issue that was fixing some non-repoquery-installed cases
This commit is contained in:
parent
63641da225
commit
ef18f9d953
1 changed files with 3 additions and 2 deletions
|
@ -141,8 +141,8 @@ def run(command):
|
|||
def install_no_repoq(module, items, yum_basecmd, latest=False):
|
||||
res = {'changed': False}
|
||||
|
||||
if not latest:
|
||||
to_install = []
|
||||
if not latest:
|
||||
for item in items:
|
||||
rc, out, err = run([rpmbin, "-q", "--whatprovides", item])
|
||||
if rc != 0:
|
||||
|
@ -150,7 +150,8 @@ def install_no_repoq(module, items, yum_basecmd, latest=False):
|
|||
if len(to_install) > 0:
|
||||
res['changed'] = True
|
||||
else:
|
||||
rc, out, err = run(yum_basecmd + ["check-update"] + items)
|
||||
cmd = yum_basecmd + ["check-update"] + items
|
||||
rc, out, err = run(cmd)
|
||||
if rc == 100:
|
||||
res['changed'] = True
|
||||
to_install = items
|
||||
|
|
Loading…
Reference in a new issue