Addresses #5023 Fix import comments

reviewable/pr18780/r1
James Tanner 11 years ago
parent 38edad70ac
commit 4f9aadcc07

@ -293,7 +293,7 @@ def main():
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -419,7 +419,7 @@ def main():
except (DoError, Exception) as e:
module.fail_json(msg=str(e))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -479,7 +479,7 @@ def main():
changed = manager.has_changed()
module.exit_json(failed=True, changed=changed, msg=repr(e))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -413,7 +413,7 @@ def main():
module.fail_json(msg="Bucket and Object parameters must be set", failed=True)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -416,7 +416,7 @@ def main():
print json.dumps(json_output)
sys.exit(0)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -327,7 +327,7 @@ def main():
print json.dumps(json_output)
sys.exit(0)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -267,7 +267,7 @@ def main():
print json.dumps(json_output)
sys.exit(0)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -249,7 +249,7 @@ def main():
print json.dumps(json_output)
sys.exit(0)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -385,7 +385,7 @@ def dispatch(keystone, user=None, password=None, tenant=None,
return dict(changed=changed, id=id)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
if __name__ == '__main__':
main()

@ -482,7 +482,7 @@ def main():
linodeServers(module, api, state, name, plan, distribution, datacenter, linode_id,
payment_term, password, ssh_pub_key, swap, wait, wait_timeout)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -533,7 +533,7 @@ def main():
module.exit_json(changed=True, instance=d)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -477,6 +477,6 @@ def main():
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -213,6 +213,6 @@ def main():
module.exit_json(changed=True, user=user)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -301,6 +301,6 @@ def main():
module.exit_json(changed=changed, db=db)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -363,6 +363,6 @@ def main():
else:
module.exit_json(msg="Slave already stopped", changed=False)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -461,6 +461,6 @@ def main():
changed = False
module.exit_json(changed=changed, user=user)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -211,6 +211,6 @@ def main():
else:
module.fail_json(msg=result, changed=False)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -269,6 +269,6 @@ def main():
module.exit_json(changed=changed, db=db)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -607,6 +607,6 @@ def main():
module.exit_json(changed=changed)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -481,6 +481,6 @@ def main():
kw['changed'] = changed
module.exit_json(**kw)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -276,6 +276,6 @@ def main():
else:
module.fail_json(msg='A valid command must be provided')
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -249,7 +249,7 @@ def main():
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -191,7 +191,7 @@ def main():
msg="%s. %d entries changed" % (msg,changes)
module.exit_json(changed=changed, msg=msg, acl=currentacl)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -173,7 +173,7 @@ def main():
# Mission complete
module.exit_json(src=src, dest=dest, md5sum=destmd5, changed=changed, msg="OK")
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -184,6 +184,6 @@ def main():
module.exit_json(**res_args)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -349,7 +349,7 @@ def main():
else:
module.fail_json(path=path, msg='unexpected position reached')
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -184,6 +184,6 @@ def main():
# Mission complete
module.exit_json(dest=dest, changed=changed, msg="OK")
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -356,7 +356,7 @@ def main():
absent(module, dest, params['regexp'], params.get('line', None), backup)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -133,7 +133,7 @@ def main():
module.exit_json(changed=False, stat=d)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -194,6 +194,6 @@ def main():
module.exit_json(**res_args)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -200,7 +200,7 @@ def main():
module.exit_json(changed=changed, msg=msg, xattr=res)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -94,6 +94,6 @@ def main():
module.exit_json(**data)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -146,6 +146,6 @@ def main():
module.exit_json(changed=changed, component=component, name=name, vhost=vhost, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -125,6 +125,6 @@ def main():
changed = len(enabled) > 0 or len(disabled) > 0
module.exit_json(changed=changed, enabled=enabled, disabled=disabled)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -243,6 +243,6 @@ def main():
module.exit_json(changed=changed, user=username, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -141,6 +141,6 @@ def main():
module.exit_json(changed=changed, name=name, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -126,7 +126,7 @@ def main():
else:
module.fail_json(msg="HTTP result code: %d" % result.code)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -133,6 +133,6 @@ def post_event(module):
except socket.error, e:
module.fail_json(msg="Socket error: %s to %s" % (e, uri))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -142,7 +142,7 @@ def main():
module.exit_json(changed=False, name=name, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -875,6 +875,6 @@ class Nagios(object):
changed=True)
######################################################################
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -156,7 +156,7 @@ def main():
else:
module.fail_json(msg="result code: %d" % result.code)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -336,6 +336,6 @@ def main():
module.fail_json(
msg="'%s' is an unknown value for the state argument" % state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -175,6 +175,6 @@ def main():
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -125,6 +125,6 @@ def main():
br.run()
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -129,6 +129,6 @@ def main():
port.run()
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -363,6 +363,6 @@ def main():
module.exit_json(url=url, dest=dest, src=tmpsrc, md5sum=md5sum_src,
sha256sum=sha256sum, changed=changed, msg=info.get('msg', ''))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -68,7 +68,7 @@ def main():
module.exit_json(content=data, encoding='base64')
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -420,6 +420,6 @@ def main():
module.exit_json(changed=changed, **uresp)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -128,6 +128,6 @@ def main():
module.exit_json(changed=True, room=room, msg=msg, notify=notify)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -194,7 +194,7 @@ def main():
module.exit_json(changed=False, msg=module.params["msg"])
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -83,6 +83,6 @@ def main():
# Mission complete
module.exit_json(msg="OK")
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -139,6 +139,6 @@ def main():
module.exit_json(changed=changed, room=room, msg_from=msg_from,
msg=msg)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -154,6 +154,6 @@ def main():
module.exit_json(changed=False, channel=channel, nick=nick,
msg=msg)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -141,6 +141,6 @@ def main():
module.exit_json(changed=False, to=to, user=user, msg=msg.getBody())
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -247,6 +247,6 @@ def main():
module.exit_json(changed=False)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -175,6 +175,6 @@ def main():
module.exit_json(changed=False, topic=topic)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -71,6 +71,6 @@ def main():
module.exit_json(msg=msg, changed=False)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -434,7 +434,7 @@ def main():
except apt.cache.LockFailedException:
module.fail_json(msg="Failed to lock apt for exclusive operation")
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -381,7 +381,7 @@ def main():
module.exit_json(changed=changed, repo=repo, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -179,7 +179,7 @@ def main():
module.exit_json(changed=changed, binary=easy_install,
name=name, virtualenv=env)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -170,7 +170,7 @@ def main():
elif p["state"] in ["absent", "removed"]:
remove_packages(module, brew_path, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -209,7 +209,7 @@ def main():
elif p["state"] == "inactive":
deactivate_packages(module, port_path, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -223,6 +223,6 @@ def main():
module.exit_json(changed=changed)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -276,6 +276,6 @@ def main():
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -143,7 +143,7 @@ def main():
elif p["state"] in ["absent", "removed"]:
remove_packages(module, opkg_path, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -212,7 +212,7 @@ def main():
elif p["state"] == "absent":
remove_packages(module, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -346,7 +346,7 @@ def main():
module.exit_json(changed=changed, cmd=cmd, name=name, version=version,
state=state, requirements=requirements, virtualenv=env, stdout=out, stderr=err)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -162,7 +162,7 @@ def main():
elif p["state"] == "absent":
remove_packages(module, pkgin_path, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -155,7 +155,7 @@ def main():
elif p["state"] == "absent":
remove_packages(module, pkgin_path, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -202,7 +202,7 @@ def main():
elif p["state"] == "absent":
remove_packages(module, pkgs)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -188,7 +188,7 @@ def main():
module.exit_json(changed=changed, name=name, state=state, msg=msg)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -202,7 +202,7 @@ def main():
elif p['state'] in [ 'removed', 'absent' ]:
remove_packages(module, packages)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -737,7 +737,7 @@ def main():
disablerepo, disable_gpg_check)
module.fail_json(msg="we should never get here unless this all failed", **res)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -224,6 +224,6 @@ def main():
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -151,7 +151,7 @@ def main():
module.exit_json(changed=changed, repo=repo, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -383,6 +383,6 @@ def main():
results = enforce_state(module, module.params)
module.exit_json(**results)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -49,7 +49,7 @@ def main():
rc, out, err = module.run_command(cmd, check_rc=True)
module.exit_json(**json.loads(out))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -107,6 +107,6 @@ def main():
module.exit_json(changed=changed)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -136,6 +136,6 @@ def main():
module.exit_json(**args)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -228,6 +228,6 @@ def main():
module.exit_json(changed=changed)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -205,6 +205,6 @@ def main():
module.exit_json(changed=changed,msg=msg)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -94,6 +94,6 @@ def main():
module.exit_json(**args)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -318,6 +318,6 @@ def main():
module.fail_json(msg='Unexpected position reached')
sys.exit(0)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -48,7 +48,7 @@ def main():
rc, out, err = module.run_command(cmd, check_rc=True)
module.exit_json(**json.loads(out))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -370,7 +370,7 @@ def main():
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -2205,6 +2205,6 @@ def main():
data = run_setup(module)
module.exit_json(**data)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -339,6 +339,6 @@ def main():
module.exit_json(changed=changed, **sysctl_args)
sys.exit(0)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -450,6 +450,6 @@ def main():
daemonize(module, password, port, timeout, minutes, ipv6)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -275,6 +275,6 @@ def main():
daemonize(module, password, port, minutes)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -196,6 +196,6 @@ def main():
elapsed = datetime.datetime.now() - start
module.exit_json(state=state, port=port, search_regex=search_regex, path=path, elapsed=elapsed.seconds)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -273,7 +273,7 @@ def main():
module.exit_json(changed=changed, out=out, cmd=cmd, app_path=app_path, virtualenv=virtualenv,
settings=module.params['settings'], pythonpath=module.params['pythonpath'])
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -211,7 +211,7 @@ def main():
module.fail_json(msg=str(e))
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
if __name__ == '__main__':

@ -135,6 +135,6 @@ def main():
module.exit_json(changed=changed)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

@ -189,7 +189,7 @@ def main():
module.exit_json(changed=False, name=name, state=state)
# this is magic, see lib/ansible/module_common.py
# import module snippets
from ansible.module_utils.basic import *
main()

Loading…
Cancel
Save