mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-15 05:11:23 +00:00
Ensure standard locale in run_command (group5-batch3) (#11774)
* Fix locale env vars in run_command() calls for group5 batch3 modules Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure locale-independent output parsing in homectl, java_cert, keyring, launchd, and listen_ports_facts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add changelog fragment for PR #11774 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:
16
changelogs/fragments/11774-group5-batch3-locale.yml
Normal file
16
changelogs/fragments/11774-group5-batch3-locale.yml
Normal file
@@ -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).
|
||||
@@ -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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user