From 0ac74aaf59d1ea028804f19cf34c5af4ede3618f Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Mon, 19 May 2014 23:22:14 -0500 Subject: [PATCH] Also set the environment variables when resetting the locale to C --- lib/ansible/module_utils/basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 33056ca81ff..e06b5cf5687 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -580,6 +580,8 @@ class AnsibleModule(object): # issues but is preferable to simply failing because # of an unknown locale locale.setlocale(locale.LC_ALL, 'C') + os.environ['LANG'] = 'C' + os.environ['LC_CTYPE'] = 'C' except Exception, e: self.fail_json(msg="An unknown error was encountered while attempting to validate the locale: %s" % e)