[PR #9157/4b0d5cb8 backport][stable-10] dnf_config_manager: fix parsing for non-english locales (#9166)
dnf_config_manager: fix parsing for non-english locales (#9157)
* dnf_config_manager: forces locale to 'C' when the module starts
* adds changelog fragment
* Apply suggestions from code review
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 4b0d5cb8cf
)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
pull/9169/head
parent
06c7ba640e
commit
4455df380e
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- dnf_config_manager - forces locale to ``C`` before module starts. If the locale was set to non-English, the output of the ``dnf config-manager`` could not be parsed (https://github.com/ansible-collections/community.general/pull/9157, https://github.com/ansible-collections/community.general/issues/9046).
|
|
@ -186,6 +186,7 @@ def main():
|
||||||
argument_spec=module_args,
|
argument_spec=module_args,
|
||||||
supports_check_mode=True
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
module.run_command_environ_update = dict(LANGUAGE='C', LC_ALL='C')
|
||||||
|
|
||||||
if not os.path.exists(DNF_BIN):
|
if not os.path.exists(DNF_BIN):
|
||||||
module.fail_json(msg="%s was not found" % DNF_BIN)
|
module.fail_json(msg="%s was not found" % DNF_BIN)
|
||||||
|
|
Loading…
Reference in New Issue