From 743591cedc09f6be77edd7c88dde1a71c419d833 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 21:27:44 +0200 Subject: [PATCH] [PR #11926/c0d3464f backport][stable-12] crypttab: fix option parsing when value contains multiple equal signs (#11929) crypttab: fix option parsing when value contains multiple equal signs (#11926) * fix(crypttab): preserve option values containing multiple equal signs Fixes #4963 * fix(crypttab): add changelog fragment for PR 11926 --------- (cherry picked from commit c0d3464fa75534b93050ef9f2748394c05b327fa) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 --- changelogs/fragments/11926-crypttab-fix-opts-equal-sign.yml | 2 ++ plugins/modules/crypttab.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/11926-crypttab-fix-opts-equal-sign.yml 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 667f2089d3..653e837c32 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: