diff --git a/changelogs/fragments/11777-group5-batch6-locale.yml b/changelogs/fragments/11777-group5-batch6-locale.yml new file mode 100644 index 0000000000..59e5230f85 --- /dev/null +++ b/changelogs/fragments/11777-group5-batch6-locale.yml @@ -0,0 +1,7 @@ +bugfixes: + - yum_versionlock - 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/11777). + - zypper_repository - 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/11777). diff --git a/plugins/modules/yum_versionlock.py b/plugins/modules/yum_versionlock.py index 1e27b8167c..605505b138 100644 --- a/plugins/modules/yum_versionlock.py +++ b/plugins/modules/yum_versionlock.py @@ -151,6 +151,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} state = module.params["state"] packages = module.params["name"] diff --git a/plugins/modules/zypper_repository.py b/plugins/modules/zypper_repository.py index f66f92ef85..876f6c366c 100644 --- a/plugins/modules/zypper_repository.py +++ b/plugins/modules/zypper_repository.py @@ -338,6 +338,7 @@ def main(): supports_check_mode=False, required_one_of=[["state", "runrefresh"]], ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} repo = module.params["repo"] alias = module.params["name"]