From 0fb01e45fb5ca22d5a4d792ccac78395c1a3fef8 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Wed, 13 Apr 2016 16:03:26 +0200 Subject: [PATCH] Sprinkle some LANG/LC_* where command output is parsed (#2019) --- lib/ansible/modules/extras/packaging/os/homebrew.py | 3 +++ lib/ansible/modules/extras/packaging/os/homebrew_cask.py | 3 +++ lib/ansible/modules/extras/system/svc.py | 2 ++ 3 files changed, 8 insertions(+) mode change 100644 => 100755 lib/ansible/modules/extras/packaging/os/homebrew.py mode change 100644 => 100755 lib/ansible/modules/extras/packaging/os/homebrew_cask.py mode change 100644 => 100755 lib/ansible/modules/extras/system/svc.py diff --git a/lib/ansible/modules/extras/packaging/os/homebrew.py b/lib/ansible/modules/extras/packaging/os/homebrew.py old mode 100644 new mode 100755 index 5225e8091c5..79b3ccec1bb --- a/lib/ansible/modules/extras/packaging/os/homebrew.py +++ b/lib/ansible/modules/extras/packaging/os/homebrew.py @@ -813,6 +813,9 @@ def main(): ), supports_check_mode=True, ) + + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') + p = module.params if p['name']: diff --git a/lib/ansible/modules/extras/packaging/os/homebrew_cask.py b/lib/ansible/modules/extras/packaging/os/homebrew_cask.py old mode 100644 new mode 100755 index e1b721a97b4..aa7d7ed84b8 --- a/lib/ansible/modules/extras/packaging/os/homebrew_cask.py +++ b/lib/ansible/modules/extras/packaging/os/homebrew_cask.py @@ -481,6 +481,9 @@ def main(): ), supports_check_mode=True, ) + + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') + p = module.params if p['name']: diff --git a/lib/ansible/modules/extras/system/svc.py b/lib/ansible/modules/extras/system/svc.py old mode 100644 new mode 100755 index 0d3a83f6305..6cc8c1d21ef --- a/lib/ansible/modules/extras/system/svc.py +++ b/lib/ansible/modules/extras/system/svc.py @@ -249,6 +249,8 @@ def main(): supports_check_mode=True, ) + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') + state = module.params['state'] enabled = module.params['enabled'] downed = module.params['downed']