added equivalent of #9636 to v2
This commit is contained in:
parent
eaddc0b309
commit
16c70dd7d4
2 changed files with 4 additions and 2 deletions
|
@ -868,6 +868,7 @@ class AnsibleModule(object):
|
|||
locale.setlocale(locale.LC_ALL, 'C')
|
||||
os.environ['LANG'] = 'C'
|
||||
os.environ['LC_CTYPE'] = 'C'
|
||||
os.environ['LC_MESSAGES'] = 'C'
|
||||
except Exception, e:
|
||||
self.fail_json(msg="An unknown error was encountered while attempting to validate the locale: %s" % e)
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class ShellModule(object):
|
|||
env = dict(
|
||||
LANG = C.DEFAULT_MODULE_LANG,
|
||||
LC_CTYPE = C.DEFAULT_MODULE_LANG,
|
||||
LC_MESSAGES = C.DEFAULT_MODULE_LANG,
|
||||
)
|
||||
env.update(kwargs)
|
||||
return ' '.join(['%s=%s' % (k, pipes.quote(unicode(v))) for k,v in env.items()])
|
||||
|
|
Loading…
Reference in a new issue