mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-15 05:11:23 +00:00
[PR #11780/5c6a5999 backport][stable-12] Ensure standard locale in run_command (group5-batch9) (#11803)
Ensure standard locale in run_command (group5-batch9) (#11780)
* Fix locale env vars in run_command() calls for group5 batch9 modules
Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in beadm, pkg5, pkg5_publisher,
and swdepot.
* Add changelog fragment for PR #11780
---------
(cherry picked from commit 5c6a599940)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -288,6 +288,7 @@ def main():
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
be = BE(module)
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ def main():
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
params = module.params
|
||||
packages = []
|
||||
|
||||
@@ -84,6 +84,7 @@ def main():
|
||||
mirror=dict(type="list", elements="str"),
|
||||
)
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
for option in ["origin", "mirror"]:
|
||||
if module.params[option] == [""]:
|
||||
|
||||
@@ -136,6 +136,7 @@ def main():
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
name = module.params["name"]
|
||||
state = module.params["state"]
|
||||
depot = module.params["depot"]
|
||||
|
||||
Reference in New Issue
Block a user