diff --git a/changelogs/fragments/992-nmcli-locale.yml b/changelogs/fragments/992-nmcli-locale.yml new file mode 100644 index 0000000000..599d795b12 --- /dev/null +++ b/changelogs/fragments/992-nmcli-locale.yml @@ -0,0 +1,2 @@ +bugfixes: +- "nmcli - set ``C`` locale when executing ``nmcli`` (https://github.com/ansible-collections/community.general/issues/989)." diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index f00befaed5..77893e6d4f 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -1760,6 +1760,7 @@ def main(): ), supports_check_mode=True, ) + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') if not HAVE_DBUS: module.fail_json(msg=missing_required_lib('dbus'), exception=DBUS_IMP_ERR)