From 9cadc9479355d584bcb9c1924a3feb6e386263fe Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Mon, 13 Apr 2026 07:57:52 +1200 Subject: [PATCH] Ensure standard locale in run_command (group5-batch12) (#11783) * Fix locale env vars in run_command() calls for group5 batch12 modules Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure locale-independent output parsing in bower, bundler, homebrew_tap, and kibana_plugin. Co-Authored-By: Claude Sonnet 4.6 * Add changelog fragment for PR #11783 Co-Authored-By: Claude Sonnet 4.6 --------- Co-authored-by: Claude Sonnet 4.6 --- .../fragments/11783-group5-batch12-locale.yml | 13 +++++++++++++ plugins/modules/bower.py | 1 + plugins/modules/bundler.py | 1 + plugins/modules/homebrew_tap.py | 1 + plugins/modules/kibana_plugin.py | 1 + 5 files changed, 17 insertions(+) create mode 100644 changelogs/fragments/11783-group5-batch12-locale.yml diff --git a/changelogs/fragments/11783-group5-batch12-locale.yml b/changelogs/fragments/11783-group5-batch12-locale.yml new file mode 100644 index 0000000000..e7d883b889 --- /dev/null +++ b/changelogs/fragments/11783-group5-batch12-locale.yml @@ -0,0 +1,13 @@ +bugfixes: + - bower - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing + (https://github.com/ansible-collections/community.general/issues/11737, + https://github.com/ansible-collections/community.general/pull/11783). + - bundler - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing + (https://github.com/ansible-collections/community.general/issues/11737, + https://github.com/ansible-collections/community.general/pull/11783). + - homebrew_tap - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing + (https://github.com/ansible-collections/community.general/issues/11737, + https://github.com/ansible-collections/community.general/pull/11783). + - kibana_plugin - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing + (https://github.com/ansible-collections/community.general/issues/11737, + https://github.com/ansible-collections/community.general/pull/11783). diff --git a/plugins/modules/bower.py b/plugins/modules/bower.py index 2d76548dbb..e4a64615a7 100644 --- a/plugins/modules/bower.py +++ b/plugins/modules/bower.py @@ -202,6 +202,7 @@ def main(): version=dict(), ) module = AnsibleModule(argument_spec=arg_spec) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} name = module.params["name"] offline = module.params["offline"] diff --git a/plugins/modules/bundler.py b/plugins/modules/bundler.py index bd7d7cab21..049cc504c6 100644 --- a/plugins/modules/bundler.py +++ b/plugins/modules/bundler.py @@ -143,6 +143,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} state = module.params.get("state") chdir = module.params.get("chdir") diff --git a/plugins/modules/homebrew_tap.py b/plugins/modules/homebrew_tap.py index 3b29bb8cfd..d543974554 100644 --- a/plugins/modules/homebrew_tap.py +++ b/plugins/modules/homebrew_tap.py @@ -230,6 +230,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} path = module.params["path"] if path: diff --git a/plugins/modules/kibana_plugin.py b/plugins/modules/kibana_plugin.py index 8bb116380a..02fcc98b94 100644 --- a/plugins/modules/kibana_plugin.py +++ b/plugins/modules/kibana_plugin.py @@ -232,6 +232,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} name = module.params["name"] state = module.params["state"]