diff --git a/changelogs/fragments/11778-group5-batch7-locale.yml b/changelogs/fragments/11778-group5-batch7-locale.yml new file mode 100644 index 0000000000..41eae735ce --- /dev/null +++ b/changelogs/fragments/11778-group5-batch7-locale.yml @@ -0,0 +1,13 @@ +bugfixes: + - zfs - 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/11778). + - zfs_delegate_admin - 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/11778). + - zfs_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/11778). + - zpool_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/11778). diff --git a/plugins/modules/zfs.py b/plugins/modules/zfs.py index 5682fa52bc..cb3d226885 100644 --- a/plugins/modules/zfs.py +++ b/plugins/modules/zfs.py @@ -254,6 +254,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} state = module.params.get("state") name = module.params.get("name") diff --git a/plugins/modules/zfs_delegate_admin.py b/plugins/modules/zfs_delegate_admin.py index 231f00e88e..27f4f5e74c 100644 --- a/plugins/modules/zfs_delegate_admin.py +++ b/plugins/modules/zfs_delegate_admin.py @@ -259,6 +259,7 @@ def main(): supports_check_mode=False, required_if=[("state", "present", ["permissions"])], ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} zfs_delegate_admin = ZfsDelegateAdmin(module) zfs_delegate_admin.run() diff --git a/plugins/modules/zfs_facts.py b/plugins/modules/zfs_facts.py index a9287c8ef8..02cc64e763 100644 --- a/plugins/modules/zfs_facts.py +++ b/plugins/modules/zfs_facts.py @@ -217,6 +217,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} if "all" in module.params["type"] and len(module.params["type"]) > 1: module.fail_json(msg="Value 'all' for parameter 'type' is mutually exclusive with other values") diff --git a/plugins/modules/zpool_facts.py b/plugins/modules/zpool_facts.py index 023df18258..deda9f5304 100644 --- a/plugins/modules/zpool_facts.py +++ b/plugins/modules/zpool_facts.py @@ -162,6 +162,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"} zpool_facts = ZPoolFacts(module)