Skip to content

Commit 4b0d5cb

Browse files
shamilovstasrussoz
andauthored
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 <[email protected]> --------- Co-authored-by: Alexei Znamensky <[email protected]>
1 parent 5a97158 commit 4b0d5cb

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bugfixes:
2+
- 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).

plugins/modules/dnf_config_manager.py

+1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def main():
186186
argument_spec=module_args,
187187
supports_check_mode=True
188188
)
189+
module.run_command_environ_update = dict(LANGUAGE='C', LC_ALL='C')
189190

190191
if not os.path.exists(DNF_BIN):
191192
module.fail_json(msg="%s was not found" % DNF_BIN)

0 commit comments

Comments
 (0)