luks_device: add sector_size option (#193)

* Add sector_size option to luks_device.

* Trying to improve error handling.

* Improve error handling.
This commit is contained in:
Felix Fontein
2021-03-02 22:02:31 +01:00
committed by GitHub
parent ea889ce2ad
commit a1897fd3b1
3 changed files with 19 additions and 4 deletions

View File

@@ -4,19 +4,22 @@
device: "{{ cryptfile_device }}"
state: closed
passphrase: "{{ cryptfile_passphrase1 }}"
type: luks2
pbkdf:
iteration_time: 0.1
algorithm: argon2i
memory: 1000
parallel: 1
sector_size: 1024
become: yes
ignore_errors: yes
register: create_passphrase_1
- name: Make sure that the previous task only fails because the LUKS version used cannot handle the PBKDF parameters
- name: Make sure that the previous task only fails if LUKS2 is not supported
assert:
that:
- create_passphrase_1 is not failed or 'Failed to set pbkdf parameters' in create_passphrase_1.msg
- "'Unknown option --type' in create_passphrase_1.msg"
when: create_passphrase_1 is failed
- name: Create with passphrase1 (without argon2i)
luks_device:
@@ -26,7 +29,7 @@
pbkdf:
iteration_time: 0.1
become: yes
when: create_passphrase_1 is failed and 'Failed to set pbkdf parameters' in create_passphrase_1.msg
when: create_passphrase_1 is failed
- name: Open with passphrase1
luks_device: