1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix aliases, package not found is not an error

This commit is contained in:
Michael DeHaan 2012-08-14 19:27:02 -04:00
parent 07fd96acc9
commit 58c975d621

View file

@ -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(),