mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-14 21:01:13 +00:00
Ensure standard locale in run_command (group5-batch7) (#11778)
* Fix locale env vars in run_command() calls for group5 batch7 modules Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure locale-independent output parsing in zfs, zfs_delegate_admin, zfs_facts, and zpool_facts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add changelog fragment for PR #11778 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
13
changelogs/fragments/11778-group5-batch7-locale.yml
Normal file
13
changelogs/fragments/11778-group5-batch7-locale.yml
Normal file
@@ -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).
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -162,6 +162,7 @@ def main():
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
zpool_facts = ZPoolFacts(module)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user