mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #11740/936ab2ea backport][stable-12] Ensure standard locale in run_command (group3-batch2) (#11755)
Ensure standard locale in run_command (group3-batch2) (#11740)
* run_command locale group3 batch2: normalise to LANGUAGE=C, LC_ALL=C
* fix changelog fragment: bugfixes, American English, separate code spans
* fix changelog fragment: correct PR number (11740)
* remove nmcli from batch2 - moved to dedicated branch
---------
(cherry picked from commit 936ab2ea56)
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:
@@ -0,0 +1,9 @@
|
|||||||
|
bugfixes:
|
||||||
|
- homebrew - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- homebrew_cask - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- icinga2_feature - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- iptables_state - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- java_keystore - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- lvol - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- pacman - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
|
- parted - normalize locale environment for ``run_command()`` calls to ``LANGUAGE=C``, ``LC_ALL=C`` (https://github.com/ansible-collections/community.general/issues/11737, https://github.com/ansible-collections/community.general/pull/11740).
|
||||||
@@ -817,7 +817,7 @@ def main():
|
|||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
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")
|
||||||
|
|
||||||
p = module.params
|
p = module.params
|
||||||
|
|
||||||
|
|||||||
@@ -779,7 +779,7 @@ def main():
|
|||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
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")
|
||||||
|
|
||||||
p = module.params
|
p = module.params
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ def main():
|
|||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
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")
|
||||||
Icinga2FeatureHelper(module).manage()
|
Icinga2FeatureHelper(module).manage()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ def main() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# We'll parse iptables-restore stderr
|
# We'll parse iptables-restore stderr
|
||||||
module.run_command_environ_update = dict(LANG="C", LC_MESSAGES="C")
|
module.run_command_environ_update = dict(LANGUAGE="C", LC_ALL="C")
|
||||||
|
|
||||||
path = module.params["path"]
|
path = module.params["path"]
|
||||||
state = module.params["state"]
|
state = module.params["state"]
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ def create_module() -> AnsibleModule:
|
|||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
add_file_common_args=True,
|
add_file_common_args=True,
|
||||||
)
|
)
|
||||||
module.run_command_environ_update = dict(LANG="C", LC_ALL="C", LC_MESSAGES="C")
|
module.run_command_environ_update = dict(LANGUAGE="C", LC_ALL="C")
|
||||||
return module
|
return module
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -239,10 +239,8 @@ from ansible.module_utils.basic import AnsibleModule
|
|||||||
|
|
||||||
LVOL_ENV_VARS = dict(
|
LVOL_ENV_VARS = dict(
|
||||||
# make sure we use the C locale when running lvol-related commands
|
# make sure we use the C locale when running lvol-related commands
|
||||||
LANG="C",
|
LANGUAGE="C",
|
||||||
LC_ALL="C",
|
LC_ALL="C",
|
||||||
LC_MESSAGES="C",
|
|
||||||
LC_CTYPE="C",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ class Pacman:
|
|||||||
def __init__(self, module):
|
def __init__(self, module):
|
||||||
self.m = module
|
self.m = module
|
||||||
|
|
||||||
self.m.run_command_environ_update = dict(LC_ALL="C")
|
self.m.run_command_environ_update = dict(LANGUAGE="C", LC_ALL="C")
|
||||||
p = self.m.params
|
p = self.m.params
|
||||||
|
|
||||||
self._msgs = []
|
self._msgs = []
|
||||||
|
|||||||
@@ -629,7 +629,7 @@ def main():
|
|||||||
],
|
],
|
||||||
supports_check_mode=True,
|
supports_check_mode=True,
|
||||||
)
|
)
|
||||||
module.run_command_environ_update = {"LANG": "C", "LC_ALL": "C", "LC_MESSAGES": "C", "LC_CTYPE": "C"}
|
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
|
||||||
|
|
||||||
# Data extraction
|
# Data extraction
|
||||||
device = module.params["device"]
|
device = module.params["device"]
|
||||||
|
|||||||
Reference in New Issue
Block a user