diff --git a/hosts.yml b/hosts.yml index e5cee77..8377038 100644 --- a/hosts.yml +++ b/hosts.yml @@ -40,11 +40,13 @@ all: source_uuid: "202c924c-ee53-4321-9efd-1f776e939702" key: "/luks_key.asc:gpg" remdev: "/dev/mmcblk0p2" + options: "--allow-discards" - name: "Samsung SSD 870" target: "disk1" source_uuid: "247ea237-54ce-45d2-9974-04344c06aba4" key: "/luks_key.asc:gpg" remdev: "/dev/mmcblk0p2" + options: "--allow-discards" mounts: diff --git a/roles/cryptoraid/templates/dmcrypt_block.j2 b/roles/cryptoraid/templates/dmcrypt_block.j2 index 98fb011..ffa99be 100644 --- a/roles/cryptoraid/templates/dmcrypt_block.j2 +++ b/roles/cryptoraid/templates/dmcrypt_block.j2 @@ -3,9 +3,11 @@ # {{ entry.name }} target='{{ entry.target }}' source='/dev/disk/by-uuid/{{ entry.source_uuid }}' -{% if entry.key is defined %}key={{ entry.key }} +{% if entry.key is defined %}key='{{ entry.key }}' {% endif %} -{% if entry.remdev is defined %}remdev={{ entry.remdev }} +{% if entry.remdev is defined %}remdev='{{ entry.remdev }}' +{% endif %} +{% if entry.options is defined %}options='{{ entry.options }}' {% endif %} {% endfor %}