diff --git a/changelogs/fragments/11774-group5-batch3-locale.yml b/changelogs/fragments/11774-group5-batch3-locale.yml new file mode 100644 index 0000000000..037f2974b2 --- /dev/null +++ b/changelogs/fragments/11774-group5-batch3-locale.yml @@ -0,0 +1,16 @@ +bugfixes: + - homectl - 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/11774). + - java_cert - 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/11774). + - keyring - 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/11774). + - launchd - 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/11774). + - listen_ports_facts - 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/11774). diff --git a/plugins/modules/homectl.py b/plugins/modules/homectl.py index c3afc244e0..0952fe09ac 100644 --- a/plugins/modules/homectl.py +++ b/plugins/modules/homectl.py @@ -614,6 +614,7 @@ def main(): ("resize", True, ["disksize"]), ], ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} if not HAS_CRYPT and not HAS_LEGACYCRYPT: module.fail_json( diff --git a/plugins/modules/java_cert.py b/plugins/modules/java_cert.py index 913a36de10..2fee900d4d 100644 --- a/plugins/modules/java_cert.py +++ b/plugins/modules/java_cert.py @@ -500,6 +500,7 @@ def main(): supports_check_mode=True, add_file_common_args=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} url = module.params.get("cert_url") path = module.params.get("cert_path") diff --git a/plugins/modules/keyring.py b/plugins/modules/keyring.py index b5cf095c43..6d592356b2 100644 --- a/plugins/modules/keyring.py +++ b/plugins/modules/keyring.py @@ -190,6 +190,7 @@ def run_module(): ) module = AnsibleModule(argument_spec=module_args, supports_check_mode=True) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} if not HAS_KEYRING: module.fail_json(msg=missing_required_lib("keyring"), exception=KEYRING_IMP_ERR) diff --git a/plugins/modules/launchd.py b/plugins/modules/launchd.py index 63c42f0e00..4108086c4d 100644 --- a/plugins/modules/launchd.py +++ b/plugins/modules/launchd.py @@ -466,6 +466,7 @@ def main(): ["state", "enabled"], ], ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} service = module.params["name"] plist_filename = module.params["plist"] diff --git a/plugins/modules/listen_ports_facts.py b/plugins/modules/listen_ports_facts.py index 44ae738f0d..96366e9b7c 100644 --- a/plugins/modules/listen_ports_facts.py +++ b/plugins/modules/listen_ports_facts.py @@ -343,6 +343,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} if module.params["include_non_listening"]: command_args = ["-p", "-u", "-n", "-t", "-a"]