1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-24 12:49:03 +00:00

Ensure standard locale in run_command (group3-batch1) (#11738)

* ensure standard locale in run_command (group3-batch1)

* add changelog frag

* fix changelog fragment: bugfixes, not minor_changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix changelog fragment: American English, separate code spans per variable

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:
Alexei Znamensky 2026-04-06 19:16:56 +12:00 committed by GitHub
parent b2cd1b555e
commit c90b504626
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 12 deletions

View file

@ -163,7 +163,7 @@ def main():
params = module.params
# We check error message for a pattern, so we need to make sure the messages appear in the form we're expecting.
# Set the locale to C to ensure consistent messages.
module.run_command_environ_update = dict(LANG="C", LC_ALL="C", LC_MESSAGES="C", LC_CTYPE="C")
module.run_command_environ_update = dict(LANGUAGE="C", LC_ALL="C")
name = params["name"] or ""
unset = params["state"] == "absent"