diff --git a/changelogs/fragments/388-luks_device-i18n.yml b/changelogs/fragments/388-luks_device-i18n.yml new file mode 100644 index 00000000..70dbad36 --- /dev/null +++ b/changelogs/fragments/388-luks_device-i18n.yml @@ -0,0 +1,2 @@ +bugfixes: + - "luks_devices - set ``LANG`` and similar environment variables to avoid translated output, which can break some of the module's functionality like key management (https://github.com/ansible-collections/community.crypto/pull/388, https://github.com/ansible-collections/community.crypto/issues/385)." diff --git a/plugins/modules/luks_device.py b/plugins/modules/luks_device.py index 4e6bde08..966f5e4a 100644 --- a/plugins/modules/luks_device.py +++ b/plugins/modules/luks_device.py @@ -821,6 +821,7 @@ def run_module(): module = AnsibleModule(argument_spec=module_args, supports_check_mode=True, mutually_exclusive=mutually_exclusive) + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C') if module.params['device'] is not None: try: