mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-15 05:11:23 +00:00
[PR #11773/8fbb43e6 backport][stable-12] Ensure standard locale in run_command (group5-batch2) (#11806)
Ensure standard locale in run_command (group5-batch2) (#11773)
* ensure standard locale in run_command (group5-batch2)
Adds ``LANGUAGE=C`` and ``LC_ALL=C`` to ``run_command()`` calls in modules
that parse command output, to prevent locale-dependent parsing failures on
non-C-locale systems.
Modules updated: cronvar, dnf_versionlock, dpkg_divert, flatpak_remote, hg.
* add changelog fragment for group5-batch2
---------
(cherry picked from commit 8fbb43e660)
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:
@@ -360,6 +360,7 @@ def main():
|
||||
mutually_exclusive=[["insertbefore", "insertafter"]],
|
||||
supports_check_mode=False,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
name = module.params["name"]
|
||||
value = module.params["value"]
|
||||
|
||||
@@ -257,6 +257,7 @@ def main():
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
patterns = module.params["name"]
|
||||
raw = module.params["raw"]
|
||||
|
||||
@@ -171,6 +171,7 @@ def main():
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
path = module.params["path"]
|
||||
state = module.params["state"]
|
||||
|
||||
@@ -199,6 +199,7 @@ def main():
|
||||
# This module supports check mode
|
||||
supports_check_mode=True,
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
|
||||
name = module.params["name"]
|
||||
flatpakrepo_url = module.params["flatpakrepo_url"]
|
||||
|
||||
@@ -219,6 +219,7 @@ def main():
|
||||
executable=dict(type="str"),
|
||||
),
|
||||
)
|
||||
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||
repo = module.params["repo"]
|
||||
dest = module.params["dest"]
|
||||
revision = module.params["revision"]
|
||||
|
||||
Reference in New Issue
Block a user