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

update hacking/test_module script to be aware of complex arguments, though it does not pass them.

This commit is contained in:
Michael DeHaan 2013-02-17 17:33:12 -05:00
parent ad89ab7c5d
commit b3eb1f32e3

View file

@ -85,8 +85,10 @@ def boilerplate_module(modfile, args):
encoded_args = "\"\"\"%s\"\"\"" % args.replace("\"","\\\"")
module_data = module_data.replace(module_common.REPLACER_ARGS, encoded_args)
encoded_lang = "\"\"\"%s\"\"\"" % C.DEFAULT_MODULE_LANG
empty_complex = "\"\"\"%s\"\"\"" % "{}"
module_data = module_data.replace(module_common.REPLACER_LANG, encoded_lang)
module_data = module_data.replace('syslog.LOG_USER', "syslog.%s" % C.DEFAULT_SYSLOG_FACILITY)
module_data = module_data.replace(module_common.REPLACER_COMPLEX, empty_complex)
modfile2_path = os.path.expanduser("~/.ansible_module_generated")
print "* including generated source, if any, saving to: %s" % modfile2_path