From 58c975d621614b18900942b00c37f07d46f08c1d Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 14 Aug 2012 19:27:02 -0400 Subject: [PATCH] Fix aliases, package not found is not an error --- library/yum | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/yum b/library/yum index d59e5cda61..144c64a63a 100755 --- a/library/yum +++ b/library/yum @@ -320,6 +320,9 @@ def install(module, items, repoq, yum_basecmd, conf_file): def remove(module, items, repoq, yum_basecmd, conf_file): + + print "DEBUG: %s/%s/%s/%s/%s" % (module,items,repoq,yum_basecmd,conf_file) + res = {} res['results'] = [] res['msg'] = '' @@ -337,7 +340,6 @@ def remove(module, items, repoq, yum_basecmd, conf_file): pkglist = is_installed(module, repoq, spec, conf_file) if not pkglist: res['msg'] += "No Package matching '%s' found installed" % spec - res['failed']=True module.exit_json(**res) found = False @@ -479,7 +481,7 @@ def main(): module = AnsibleModule( argument_spec = dict( - name=dict(aliases=['name']), + name=dict(aliases=['pkg']), # removed==absent, installed==present, these are accepted as aliases state=dict(default='installed', choices=['absent','present','installed','removed','latest']), list=dict(),