|
|
@ -141,8 +141,8 @@ def run(command):
|
|
|
|
def install_no_repoq(module, items, yum_basecmd, latest=False):
|
|
|
|
def install_no_repoq(module, items, yum_basecmd, latest=False):
|
|
|
|
res = {'changed': False}
|
|
|
|
res = {'changed': False}
|
|
|
|
|
|
|
|
|
|
|
|
if not latest:
|
|
|
|
|
|
|
|
to_install = []
|
|
|
|
to_install = []
|
|
|
|
|
|
|
|
if not latest:
|
|
|
|
for item in items:
|
|
|
|
for item in items:
|
|
|
|
rc, out, err = run([rpmbin, "-q", "--whatprovides", item])
|
|
|
|
rc, out, err = run([rpmbin, "-q", "--whatprovides", item])
|
|
|
|
if rc != 0:
|
|
|
|
if rc != 0:
|
|
|
@ -150,7 +150,8 @@ def install_no_repoq(module, items, yum_basecmd, latest=False):
|
|
|
|
if len(to_install) > 0:
|
|
|
|
if len(to_install) > 0:
|
|
|
|
res['changed'] = True
|
|
|
|
res['changed'] = True
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
rc, out, err = run(yum_basecmd + ["check-update"] + items)
|
|
|
|
cmd = yum_basecmd + ["check-update"] + items
|
|
|
|
|
|
|
|
rc, out, err = run(cmd)
|
|
|
|
if rc == 100:
|
|
|
|
if rc == 100:
|
|
|
|
res['changed'] = True
|
|
|
|
res['changed'] = True
|
|
|
|
to_install = items
|
|
|
|
to_install = items
|
|
|
|