crypttab: fix option parsing when value contains multiple equal signs (#11926)

* fix(crypttab): preserve option values containing multiple equal signs

Fixes #4963

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(crypttab): add changelog fragment for PR 11926

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexei Znamensky
2026-04-29 07:14:44 +12:00
committed by GitHub
parent 89d82ab9df
commit c0d3464fa7
2 changed files with 3 additions and 1 deletions

View File

@@ -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).

View File

@@ -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: