mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-21 11:19:00 +00:00
[PR #11776/e45e6cbb backport][stable-12] Ensure standard locale in run_command (group5-batch5) (#11809)
Ensure standard locale in run_command (group5-batch5) (#11776)
* Fix locale env vars in run_command() calls for group5 batch5 modules
Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in pnpm, sysrc, timezone, xattr,
and yarn.
* Add changelog fragment for PR #11776
---------
(cherry picked from commit e45e6cbb5d)
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:
parent
c65a675a52
commit
cfa712f30e
6 changed files with 21 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ class Sysrc(StateModuleHelper):
|
|||
if not re.match(r"^\w+$", self.vars.name, re.ASCII):
|
||||
self.module.fail_json(msg="Name may only contain alpha-numeric and underscore characters")
|
||||
|
||||
self.module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
self.sysrc = self.module.get_bin_path("sysrc", True)
|
||||
|
||||
def _contains(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue