diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index aab74eb43b..df09d47ff9 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -282,7 +282,8 @@ class Inventory(object): vars = {} for ip in self._vars_plugins: updated = ip.run(host) - vars.update(updated) + if updated is not None: + vars.update(updated) if self._is_script: cmd = subprocess.Popen( 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)