Skip to content

Commit

Permalink
Set LANG and similar env variables to prevent translated cryptsetup o…
Browse files Browse the repository at this point in the history
…utput. (#388)
  • Loading branch information
felixfontein authored Jan 30, 2022
1 parent 5abfe8f commit ea2e45d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/388-luks_device-i18n.yml
Original file line number Diff line number Diff line change
@@ -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)."
1 change: 1 addition & 0 deletions plugins/modules/luks_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ea2e45d

Please sign in to comment.