Fix linting errors.

This commit is contained in:
Felix Fontein
2025-04-26 09:01:44 +02:00
parent 51a4f76f26
commit 33ef158b09
132 changed files with 2305 additions and 2214 deletions

View File

@@ -21,13 +21,13 @@
vars:
search:
files:
- '{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml'
- '{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml'
- '{{ ansible_distribution | lower }}.yml'
- '{{ ansible_os_family | lower }}.yml'
- default.yml
- '{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version }}.yml'
- '{{ ansible_distribution | lower }}-{{ ansible_distribution_version }}.yml'
- '{{ ansible_distribution | lower }}.yml'
- '{{ ansible_os_family | lower }}.yml'
- default.yml
paths:
- vars
- vars
- name: Make sure cryptsetup is installed
package:
@@ -71,21 +71,21 @@
cryptfile_passphrase3: "qQJqsjabO9pItV792k90VvX84MM"
- block:
- include_tasks: run-test.yml
with_fileglob:
- "tests/*.yml"
- include_tasks: run-test.yml
with_fileglob:
- "tests/*.yml"
always:
- name: Make sure LUKS device is gone
luks_device:
device: "{{ cryptfile_device }}"
state: absent
become: true
ignore_errors: true
- name: Make sure LUKS device is gone
luks_device:
device: "{{ cryptfile_device }}"
state: absent
become: true
ignore_errors: true
- command: losetup -d "{{ cryptfile_device }}"
become: true
- command: losetup -d "{{ cryptfile_device }}"
become: true
- file:
dest: "{{ remote_tmp_dir.replace('~', ansible_env.HOME) }}/cryptfile"
state: absent
- file:
dest: "{{ remote_tmp_dir.replace('~', ansible_env.HOME) }}/cryptfile"
state: absent

View File

@@ -43,10 +43,10 @@
register: create_idem_check
- assert:
that:
- create_check is changed
- create is changed
- create_idem is not changed
- create_idem_check is not changed
- create_check is changed
- create is changed
- create_idem is not changed
- create_idem_check is not changed
- name: Open (check)
luks_device:
@@ -80,10 +80,10 @@
register: open_idem_check
- assert:
that:
- open_check is changed
- open is changed
- open_idem is not changed
- open_idem_check is not changed
- open_check is changed
- open is changed
- open_idem is not changed
- open_idem_check is not changed
- name: Closed (via name, check)
luks_device:
@@ -113,10 +113,10 @@
register: close_idem_check
- assert:
that:
- close_check is changed
- close is changed
- close_idem is not changed
- close_idem_check is not changed
- close_check is changed
- close is changed
- close_idem is not changed
- close_idem_check is not changed
- name: Re-open
luks_device:
@@ -153,10 +153,10 @@
register: close_idem_check
- assert:
that:
- close_check is changed
- close is changed
- close_idem is not changed
- close_idem_check is not changed
- close_check is changed
- close is changed
- close_idem is not changed
- close_idem_check is not changed
- name: Re-opened
luks_device:
@@ -193,7 +193,7 @@
register: absent_idem_check
- assert:
that:
- absent_check is changed
- absent is changed
- absent_idem is not changed
- absent_idem_check is not changed
- absent_check is changed
- absent is changed
- absent_idem is not changed
- absent_idem_check is not changed

View File

@@ -54,9 +54,9 @@
register: absent
- assert:
that:
- create is changed
- open is changed
- open_idem is not changed
- close is changed
- close_idem is not changed
- absent is changed
- create is changed
- open is changed
- open_idem is not changed
- close is changed
- close_idem is not changed
- absent is changed

View File

@@ -24,7 +24,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -41,7 +41,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Give access to keyfile2
luks_device:
@@ -80,7 +80,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -126,7 +126,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Try to open with keyfile2
luks_device:
@@ -138,7 +138,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -160,8 +160,8 @@
register: remove_last_key
- assert:
that:
- remove_last_key is failed
- "'force_remove_last_key' in remove_last_key.msg"
- remove_last_key is failed
- "'force_remove_last_key' in remove_last_key.msg"
# Access: keyfile2
@@ -175,7 +175,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -203,4 +203,4 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed

View File

@@ -42,7 +42,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -59,7 +59,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Give access to passphrase1
luks_device:
@@ -90,7 +90,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Open with passphrase1
luks_device:
@@ -102,4 +102,4 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed

View File

@@ -51,11 +51,11 @@
register: luks_header_slot4
- assert:
that:
- create_luks_slot4_check is changed
- create_luks_slot4 is changed
- create_luks_slot4_idem is not changed
- create_luks_slot4_idem_check is not changed
- "'Key Slot 4: ENABLED' in luks_header_slot4.stdout or '4: luks2' in luks_header_slot4.stdout"
- create_luks_slot4_check is changed
- create_luks_slot4 is changed
- create_luks_slot4_idem is not changed
- create_luks_slot4_idem_check is not changed
- "'Key Slot 4: ENABLED' in luks_header_slot4.stdout or '4: luks2' in luks_header_slot4.stdout"
- name: Add key in slot 2 (check)
luks_device:
@@ -109,11 +109,11 @@
register: luks_header_slot2
- assert:
that:
- add_luks_slot2_check is changed
- add_luks_slot2 is changed
- add_luks_slot2_idem is not changed
- add_luks_slot2_idem_check is not changed
- "'Key Slot 2: ENABLED' in luks_header_slot2.stdout or '2: luks2' in luks_header_slot2.stdout"
- add_luks_slot2_check is changed
- add_luks_slot2 is changed
- add_luks_slot2_idem is not changed
- add_luks_slot2_idem_check is not changed
- "'Key Slot 2: ENABLED' in luks_header_slot2.stdout or '2: luks2' in luks_header_slot2.stdout"
- name: Check remove slot 4 without key
luks_device:
@@ -132,8 +132,8 @@
register: kill_slot4_key_slot4
- assert:
that:
- kill_slot4_nokey is failed
- kill_slot4_key_slot4 is failed
- kill_slot4_nokey is failed
- kill_slot4_key_slot4 is failed
- name: Remove key in slot 4 (check)
luks_device:
@@ -171,11 +171,11 @@
register: luks_header_slot4_removed
- assert:
that:
- kill_luks_slot4_check is changed
- kill_luks_slot4 is changed
- kill_luks_slot4_idem is not changed
- kill_luks_slot4_idem_check is not changed
- "'Key Slot 4: DISABLED' in luks_header_slot4_removed.stdout or not '4: luks' in luks_header_slot4_removed.stdout"
- kill_luks_slot4_check is changed
- kill_luks_slot4 is changed
- kill_luks_slot4_idem is not changed
- kill_luks_slot4_idem_check is not changed
- "'Key Slot 4: DISABLED' in luks_header_slot4_removed.stdout or not '4: luks' in luks_header_slot4_removed.stdout"
- name: Add key in slot 0
luks_device:
@@ -201,6 +201,6 @@
register: luks_header_slot0_removed
- assert:
that:
- add_luks_slot0 is changed
- kill_luks_slot0 is changed
- "'Key Slot 0: DISABLED' in luks_header_slot0_removed.stdout or not '0: luks' in luks_header_slot0_removed.stdout"
- add_luks_slot0 is changed
- kill_luks_slot0 is changed
- "'Key Slot 0: DISABLED' in luks_header_slot0_removed.stdout or not '0: luks' in luks_header_slot0_removed.stdout"

View File

@@ -34,7 +34,7 @@
register: keyslot_duplicate
- assert:
that:
- keyslot_duplicate_check is failed
- "'Trying to add key that is already present in another slot' in keyslot_duplicate_check.msg"
- keyslot_duplicate is failed
- "'Trying to add key that is already present in another slot' in keyslot_duplicate.msg"
- keyslot_duplicate_check is failed
- "'Trying to add key that is already present in another slot' in keyslot_duplicate_check.msg"
- keyslot_duplicate is failed
- "'Trying to add key that is already present in another slot' in keyslot_duplicate.msg"

View File

@@ -40,9 +40,9 @@
register: create_luks_slot8
- assert:
that:
- create_luks1_slot8 is failed
- create_luks2_slot32 is failed
- create_luks_slot8 is failed
- create_luks1_slot8 is failed
- create_luks2_slot32 is failed
- create_luks_slot8 is failed
- name: Check valid slot (luks2, 8)
luks_device:
@@ -59,7 +59,7 @@
- name: Make sure that the previous task only fails if LUKS2 is not supported
assert:
that:
- "'Unknown option --type' in create_luks2_slot8.msg"
- "'Unknown option --type' in create_luks2_slot8.msg"
when: create_luks2_slot8 is failed
- name: Check add valid slot (no luks type, 10)
luks_device:
@@ -75,5 +75,5 @@
when: create_luks2_slot8 is changed
- assert:
that:
- create_luks_slot10 is changed
- create_luks_slot10 is changed
when: create_luks2_slot8 is changed

View File

@@ -47,7 +47,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -80,7 +80,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Give access to passphrase2
luks_device:
@@ -117,7 +117,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -134,7 +134,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Give access to keyfile1 from passphrase1
luks_device:
@@ -169,7 +169,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"
@@ -207,7 +207,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Try to open with passphrase3
luks_device:
@@ -219,7 +219,7 @@
register: open_try
- assert:
that:
- open_try is failed
- open_try is failed
- name: Give access to passphrase3 from keyfile1
luks_device:
@@ -241,7 +241,7 @@
register: open_try
- assert:
that:
- open_try is not failed
- open_try is not failed
- name: Close
luks_device:
device: "{{ cryptfile_device }}"

View File

@@ -69,10 +69,10 @@
register: create_open_idem_check
- assert:
that:
- create_open_check is changed
- create_open is changed
- create_open_idem is not changed
- create_open_idem_check is not changed
- create_open_check is changed
- create_open is changed
- create_open_idem is not changed
- create_open_idem_check is not changed
- name: Dump LUKS Header
command: "cryptsetup luksDump {{ cryptfile_device }}"