diff --git a/changelogs/fragments/11773-group5-batch2-locale.yml b/changelogs/fragments/11773-group5-batch2-locale.yml new file mode 100644 index 0000000000..701ee81429 --- /dev/null +++ b/changelogs/fragments/11773-group5-batch2-locale.yml @@ -0,0 +1,6 @@ +bugfixes: + - cronvar - ensure ``LANGUAGE=C`` and ``LC_ALL=C`` are set when running commands that parse output (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11773). + - dnf_versionlock - ensure ``LANGUAGE=C`` and ``LC_ALL=C`` are set when running commands that parse output (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11773). + - dpkg_divert - ensure ``LANGUAGE=C`` and ``LC_ALL=C`` are set when running commands that parse output (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11773). + - flatpak_remote - ensure ``LANGUAGE=C`` and ``LC_ALL=C`` are set when running commands that parse output (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11773). + - hg - ensure ``LANGUAGE=C`` and ``LC_ALL=C`` are set when running commands that parse output (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11773). diff --git a/plugins/modules/cronvar.py b/plugins/modules/cronvar.py index a1c60c2d0f..3ef6f0b0f9 100644 --- a/plugins/modules/cronvar.py +++ b/plugins/modules/cronvar.py @@ -360,6 +360,7 @@ def main(): mutually_exclusive=[["insertbefore", "insertafter"]], supports_check_mode=False, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} name = module.params["name"] value = module.params["value"] diff --git a/plugins/modules/dnf_versionlock.py b/plugins/modules/dnf_versionlock.py index 7095fb102a..c6c15fee1a 100644 --- a/plugins/modules/dnf_versionlock.py +++ b/plugins/modules/dnf_versionlock.py @@ -257,6 +257,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} patterns = module.params["name"] raw = module.params["raw"] diff --git a/plugins/modules/dpkg_divert.py b/plugins/modules/dpkg_divert.py index 1fcf144b86..19896640e1 100644 --- a/plugins/modules/dpkg_divert.py +++ b/plugins/modules/dpkg_divert.py @@ -171,6 +171,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} path = module.params["path"] state = module.params["state"] diff --git a/plugins/modules/flatpak_remote.py b/plugins/modules/flatpak_remote.py index 5d54acc35f..81c01d0fe1 100644 --- a/plugins/modules/flatpak_remote.py +++ b/plugins/modules/flatpak_remote.py @@ -199,6 +199,7 @@ def main(): # This module supports check mode supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} name = module.params["name"] flatpakrepo_url = module.params["flatpakrepo_url"] diff --git a/plugins/modules/hg.py b/plugins/modules/hg.py index 14e6de9720..73eef182a0 100644 --- a/plugins/modules/hg.py +++ b/plugins/modules/hg.py @@ -219,6 +219,7 @@ def main(): executable=dict(type="str"), ), ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} repo = module.params["repo"] dest = module.params["dest"] revision = module.params["revision"]