mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
[PR #10333/731f0be3 backport][stable-10] Configure LUKS encrypted volume using crypttab (#10389)
Configure LUKS encrypted volume using crypttab (#10333)
(cherry picked from commit 731f0be3f4)
Co-authored-by: Aditya Putta <puttaa@yahoo.com>
This commit is contained in:
@@ -73,6 +73,14 @@ EXAMPLES = r"""
|
|||||||
opts: discard
|
opts: discard
|
||||||
loop: '{{ ansible_mounts }}'
|
loop: '{{ ansible_mounts }}'
|
||||||
when: "'/dev/mapper/luks-' in item.device"
|
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
|
import os
|
||||||
|
|||||||
Reference in New Issue
Block a user