mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #11775/7c52f1c4 backport][stable-12] Ensure standard locale in run_command (group5-batch4) (#11808)
Ensure standard locale in run_command (group5-batch4) (#11775)
* Fix locale env vars in run_command() calls for group5 batch4 modules
Set LANGUAGE=C and LC_ALL=C via run_command_environ_update to ensure
locale-independent output parsing in logstash_plugin, lvg, mas,
osx_defaults, and pkgutil.
* Add changelog fragment for PR #11775
---------
(cherry picked from commit 7c52f1c41d)
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:
16
changelogs/fragments/11775-group5-batch4-locale.yml
Normal file
16
changelogs/fragments/11775-group5-batch4-locale.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
bugfixes:
|
||||||
|
- logstash_plugin - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/11737,
|
||||||
|
https://github.com/ansible-collections/community.general/pull/11775).
|
||||||
|
- lvg - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/11737,
|
||||||
|
https://github.com/ansible-collections/community.general/pull/11775).
|
||||||
|
- mas - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/11737,
|
||||||
|
https://github.com/ansible-collections/community.general/pull/11775).
|
||||||
|
- osx_defaults - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/11737,
|
||||||
|
https://github.com/ansible-collections/community.general/pull/11775).
|
||||||
|
- pkgutil - set ``LANGUAGE`` and ``LC_ALL`` to ``C`` in ``run_command()`` calls to ensure locale-independent output parsing
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/11737,
|
||||||
|
https://github.com/ansible-collections/community.general/pull/11775).
|
||||||
@@ -147,6 +147,7 @@ def main():
|
|||||||
),
|
),
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||||
|
|
||||||
name = module.params["name"]
|
name = module.params["name"]
|
||||||
state = module.params["state"]
|
state = module.params["state"]
|
||||||
|
|||||||
@@ -424,6 +424,7 @@ def main():
|
|||||||
],
|
],
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||||
|
|
||||||
vg = module.params["vg"]
|
vg = module.params["vg"]
|
||||||
state = module.params["state"]
|
state = module.params["state"]
|
||||||
|
|||||||
@@ -265,6 +265,7 @@ def main():
|
|||||||
),
|
),
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||||
mas = Mas(module)
|
mas = Mas(module)
|
||||||
|
|
||||||
if module.params["id"]:
|
if module.params["id"]:
|
||||||
|
|||||||
@@ -498,6 +498,7 @@ def main():
|
|||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
required_if=(("state", "present", ["value"]),),
|
required_if=(("state", "present", ["value"]),),
|
||||||
)
|
)
|
||||||
|
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
defaults = OSXDefaults(module=module)
|
defaults = OSXDefaults(module=module)
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ def main():
|
|||||||
),
|
),
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||||
name = module.params["name"]
|
name = module.params["name"]
|
||||||
state = module.params["state"]
|
state = module.params["state"]
|
||||||
site = module.params["site"]
|
site = module.params["site"]
|
||||||
|
|||||||
Reference in New Issue
Block a user