mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-24 01:49:08 -07:00
Merge pull request #1387 from skvidal/devel
when a pkg is installed, but not from any repo, don't error out
This commit is contained in:
commit
51b423b593
1 changed files with 5 additions and 1 deletions
|
@ -212,7 +212,10 @@ def what_provides(module, repoq, req_spec, conf_file, qf=def_qf):
|
||||||
rc2,out2,err2 = run(cmd)
|
rc2,out2,err2 = run(cmd)
|
||||||
if rc == 0 and rc2 == 0:
|
if rc == 0 and rc2 == 0:
|
||||||
out += out2
|
out += out2
|
||||||
return set([ p for p in out.split('\n') if p.strip() ])
|
pkgs = set([ p for p in out.split('\n') if p.strip() ])
|
||||||
|
if not pkgs:
|
||||||
|
pkgs = is_installed(module, repoq, req_spec, conf_file, qf=qf)
|
||||||
|
return pkgs
|
||||||
else:
|
else:
|
||||||
module.fail_json(msg='Error from repoquery: %s' % err + err2)
|
module.fail_json(msg='Error from repoquery: %s' % err + err2)
|
||||||
|
|
||||||
|
@ -350,6 +353,7 @@ def install(module, items, repoq, yum_basecmd, conf_file):
|
||||||
if is_installed(module, repoq, this, conf_file):
|
if is_installed(module, repoq, this, conf_file):
|
||||||
found = True
|
found = True
|
||||||
res['results'].append('%s providing %s is already installed' % (this, spec))
|
res['results'].append('%s providing %s is already installed' % (this, spec))
|
||||||
|
break
|
||||||
|
|
||||||
if found:
|
if found:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue