diff --git a/changelogs/fragments/11926-crypttab-fix-opts-equal-sign.yml b/changelogs/fragments/11926-crypttab-fix-opts-equal-sign.yml new file mode 100644 index 0000000000..3f0e202814 --- /dev/null +++ b/changelogs/fragments/11926-crypttab-fix-opts-equal-sign.yml @@ -0,0 +1,2 @@ +bugfixes: + - crypttab - fix parsing of options whose value contains an equal sign (https://github.com/ansible-collections/community.general/issues/4963, https://github.com/ansible-collections/community.general/pull/11926). diff --git a/plugins/modules/crypttab.py b/plugins/modules/crypttab.py index d64570ca48..55d9e6ea0d 100644 --- a/plugins/modules/crypttab.py +++ b/plugins/modules/crypttab.py @@ -281,7 +281,7 @@ class Options(dict): self.itemlist = [] if opts_string is not None: for opt in opts_string.split(","): - kv = opt.split("=") + kv = opt.split("=", 1) if len(kv) > 1: k, v = (kv[0], kv[1]) else: