diff options
author | Seth Vidal <skvidal@fedoraproject.org> | 2012-10-29 13:48:20 -0400 |
---|---|---|
committer | Seth Vidal <skvidal@fedoraproject.org> | 2012-10-29 13:48:20 -0400 |
commit | 7c1e0de1412a91489cdd5558c724bb79b2b41e7e (patch) | |
tree | 58da588aaa6ba6fd7938c51b8593fc7960d73bd3 /library/yum | |
parent | 3fcc591f18de72f82f260e55dd3cd87a61b03d0e (diff) | |
download | ansible-7c1e0de1412a91489cdd5558c724bb79b2b41e7e.tar.gz |
fix removal case where first pkg in a list is not installed at all
and the next one gets ignored despite being installed.
also clean up unnecessary second check.
Diffstat (limited to 'library/yum')
-rwxr-xr-x | library/yum | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/library/yum b/library/yum index f28009ff1e..7998b3af16 100755 --- a/library/yum +++ b/library/yum @@ -440,13 +440,9 @@ def remove(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos): else: pkglist = is_installed(module, repoq, spec, conf_file, en_repos=en_repos, dis_repos=dis_repos) if not pkglist: - res['msg'] += "No Package matching '%s' found installed" % spec - module.exit_json(**res) - - found = False - for this in pkglist: - if is_installed(module, repoq, this, conf_file, en_repos=en_repos, dis_repos=dis_repos): - found = True + found = False + else: + found = True if not found: res['results'].append('%s is not installed' % spec) |