diff options
author | Stephen Fromm <stephenf@nero.net> | 2012-11-27 00:07:13 -0800 |
---|---|---|
committer | Stephen Fromm <stephenf@nero.net> | 2012-11-27 00:16:06 -0800 |
commit | 6a68d3813f5043e55ea798591421c8efa5e5460f (patch) | |
tree | 2c61adf16cc91b8d606a0dd2ce5dfca5a2850552 /hacking/test-module | |
parent | dd5a8474f839dff3d600d0ba09351db55f8c6672 (diff) | |
download | ansible-6a68d3813f5043e55ea798591421c8efa5e5460f.tar.gz |
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.
Diffstat (limited to 'hacking/test-module')
-rwxr-xr-x | hacking/test-module | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hacking/test-module b/hacking/test-module index 240eb130d9..4ccde5502c 100755 --- a/hacking/test-module +++ b/hacking/test-module @@ -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") |