mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-18 01:41:35 +00:00
Ensure standard locale in run_command (group5-batch10) (#11781)
* Fix locale env vars in run_command() calls for group5 batch10 modules Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure locale-independent output parsing in imgadm, smartos_image_info, syspatch, portage, portinstall, xbps, and lbu. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Add changelog fragment for PR #11781 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:
parent
fe9e728401
commit
5f0a9bba01
8 changed files with 29 additions and 0 deletions
|
|
@ -276,6 +276,7 @@ def main():
|
|||
# provide a "noop" (or equivalent) mode to do a dry-run.
|
||||
supports_check_mode=False,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
imgadm = Imgadm(module)
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ def run_module():
|
|||
},
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
changed = False
|
||||
|
||||
|
|
|
|||
|
|
@ -587,6 +587,7 @@ def main():
|
|||
],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
if not HAS_PORTAGE:
|
||||
if sys.executable != "/usr/bin/python" and not has_respawned():
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ def main():
|
|||
use_packages=dict(type="bool", default=True),
|
||||
)
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
p = module.params
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ def main():
|
|||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
image_facts = ImageFacts(module)
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ def run_module():
|
|||
argument_spec=module_args,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
result = syspatch_run(module)
|
||||
|
||||
|
|
|
|||
|
|
@ -361,6 +361,7 @@ def main():
|
|||
required_one_of=[["name", "update_cache", "upgrade"]],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
xbps_path = dict()
|
||||
xbps_path["install"] = module.get_bin_path("xbps-install", True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue