From a2e198d8a7e8465940b732f35d9cfcdb7ec3898e Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:50:11 +0200 Subject: [PATCH] [PR #10333/731f0be3 backport][stable-10] Configure LUKS encrypted volume using crypttab (#10389) Configure LUKS encrypted volume using crypttab (#10333) (cherry picked from commit 731f0be3f43a1f621ebdeaa08d330796eb351e45) Co-authored-by: Aditya Putta --- plugins/modules/crypttab.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/modules/crypttab.py b/plugins/modules/crypttab.py index 05a5afb082..d2fda93da8 100644 --- a/plugins/modules/crypttab.py +++ b/plugins/modules/crypttab.py @@ -73,6 +73,14 @@ EXAMPLES = r""" opts: discard loop: '{{ ansible_mounts }}' when: "'/dev/mapper/luks-' in item.device" + +- name: Add entry to /etc/crypttab for luks-home with password file + community.general.crypttab: + name: luks-home + backing_device: UUID=123e4567-e89b-12d3-a456-426614174000 + password: /root/keys/luks-home.key + opts: discard,cipher=aes-cbc-essiv:sha256 + state: present """ import os