summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2015-09-04 08:52:34 -0700
committerToshio Kuratomi <toshio@fedoraproject.org>2015-09-04 08:52:34 -0700
commit411adff00687842dd1c379fd78b6b2562c6f97e4 (patch)
tree7df919f638458ee202dab38befac7822ae4c57e3
parentcf88f2786822ab5f4a1cd711761a40df49bd93f0 (diff)
downloadansible-modules-core-411adff00687842dd1c379fd78b6b2562c6f97e4.tar.gz
Use exit_json in the latest yum subcommand instead of returning the result.
Returning the resut is what we do in devel but the 1.9.x code isn't able to handle that properly yet.
-rw-r--r--packaging/os/yum.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/packaging/os/yum.py b/packaging/os/yum.py
index 1337abf8..d780326e 100644
--- a/packaging/os/yum.py
+++ b/packaging/os/yum.py
@@ -733,7 +733,7 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
rc, out, err = module.run_command(yum_basecmd + ['check-update'])
if rc == 0 and update_all:
res['results'].append('Nothing to do here, all packages are up to date')
- return res
+ module.exit_json(**res)
elif rc == 100:
available_updates = out.split('\n')
# build update dictionary
@@ -813,7 +813,7 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos):
if len(will_update) > 0 or len(pkgs['install']) > 0:
res['changed'] = True
- return res
+ module.exit_json(**res)
# run commands
if cmd: # update all