mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 15:34:01 -07:00
Set LANG in module_common.py
Add constant DEFAULT_MODULE_LANG that defaults to C. Can be set via environment variable ANSIBLE_MODULE_LANG or configuration variable module_lang. Updated test-module to have same behavior.
This commit is contained in:
parent
dd5a8474f8
commit
6a68d3813f
4 changed files with 8 additions and 0 deletions
|
@ -84,6 +84,8 @@ def boilerplate_module(modfile, args):
|
|||
module_data = module_data.replace(module_common.REPLACER, module_common.MODULE_COMMON)
|
||||
encoded_args = "\"\"\"%s\"\"\"" % args.replace("\"","\\\"")
|
||||
module_data = module_data.replace(module_common.REPLACER_ARGS, encoded_args)
|
||||
encoded_lang = "\"\"\"%s\"\"\"" % C.DEFAULT_MODULE_LANG
|
||||
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)
|
||||
|
||||
modfile2_path = os.path.expanduser("~/.ansible_module_generated")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue