diff --git a/changelogs/fragments/11782-group5-batch11-locale.yml b/changelogs/fragments/11782-group5-batch11-locale.yml new file mode 100644 index 0000000000..6a7827b308 --- /dev/null +++ b/changelogs/fragments/11782-group5-batch11-locale.yml @@ -0,0 +1,13 @@ +bugfixes: + - apt_repo - 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/11782). + - easy_install - 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/11782). + - pear - 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/11782). + - zypper_repository_info - 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/11782). diff --git a/plugins/modules/apt_repo.py b/plugins/modules/apt_repo.py index c1ce5b3db4..4814418224 100644 --- a/plugins/modules/apt_repo.py +++ b/plugins/modules/apt_repo.py @@ -122,6 +122,7 @@ def main(): update=dict(type="bool", default=False), ), ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} if not os.path.exists(APT_REPO_PATH): module.fail_json(msg="cannot find /usr/bin/apt-repo") diff --git a/plugins/modules/easy_install.py b/plugins/modules/easy_install.py index 4d8d6bbd12..81e8c73fb7 100644 --- a/plugins/modules/easy_install.py +++ b/plugins/modules/easy_install.py @@ -139,6 +139,7 @@ def main(): ) module = AnsibleModule(argument_spec=arg_spec, supports_check_mode=True) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} name = module.params["name"] env = module.params["virtualenv"] diff --git a/plugins/modules/pear.py b/plugins/modules/pear.py index 866aff82b1..5781c40f32 100644 --- a/plugins/modules/pear.py +++ b/plugins/modules/pear.py @@ -298,6 +298,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} p = module.params diff --git a/plugins/modules/zypper_repository_info.py b/plugins/modules/zypper_repository_info.py index f3429dba85..ca45fff4fe 100644 --- a/plugins/modules/zypper_repository_info.py +++ b/plugins/modules/zypper_repository_info.py @@ -115,6 +115,7 @@ def _parse_repos(module): def main(): module = AnsibleModule(argument_spec=dict(), supports_check_mode=True) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} deps.validate(parseXML)