|
|
|
@ -1,12 +1,12 @@
|
|
|
|
|
---
|
|
|
|
|
#- name: Create (check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: present
|
|
|
|
|
# keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: create_check
|
|
|
|
|
- name: Create (check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: present
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: create_check
|
|
|
|
|
- name: Create
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
@ -21,29 +21,29 @@
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
become: yes
|
|
|
|
|
register: create_idem
|
|
|
|
|
#- name: Create (idempotent, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: present
|
|
|
|
|
# keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: create_idem_check
|
|
|
|
|
- name: Create (idempotent, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: present
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: create_idem_check
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
#- create_check is changed
|
|
|
|
|
- create_check is changed
|
|
|
|
|
- create is changed
|
|
|
|
|
- create_idem is not changed
|
|
|
|
|
#- create_idem_check is not changed
|
|
|
|
|
- create_idem_check is not changed
|
|
|
|
|
|
|
|
|
|
#- name: Open (check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: opened
|
|
|
|
|
# keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: open_check
|
|
|
|
|
- name: Open (check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: opened
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: open_check
|
|
|
|
|
- name: Open
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
@ -58,28 +58,28 @@
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
become: yes
|
|
|
|
|
register: open_idem
|
|
|
|
|
#- name: Open (idempotent, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: opened
|
|
|
|
|
# keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: open_idem_check
|
|
|
|
|
- name: Open (idempotent, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: opened
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: open_idem_check
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
#- open_check is changed
|
|
|
|
|
- open_check is changed
|
|
|
|
|
- open is changed
|
|
|
|
|
- open_idem is not changed
|
|
|
|
|
#- open_idem_check is not changed
|
|
|
|
|
- open_idem_check is not changed
|
|
|
|
|
|
|
|
|
|
#- name: Closed (via name, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# name: "{{ open.name }}"
|
|
|
|
|
# state: closed
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: close_check
|
|
|
|
|
- name: Closed (via name, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
name: "{{ open.name }}"
|
|
|
|
|
state: closed
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: close_check
|
|
|
|
|
- name: Closed (via name)
|
|
|
|
|
luks_device:
|
|
|
|
|
name: "{{ open.name }}"
|
|
|
|
@ -92,19 +92,19 @@
|
|
|
|
|
state: closed
|
|
|
|
|
become: yes
|
|
|
|
|
register: close_idem
|
|
|
|
|
#- name: Closed (via name, idempotent, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# name: "{{ open.name }}"
|
|
|
|
|
# state: closed
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: close_idem_check
|
|
|
|
|
- name: Closed (via name, idempotent, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
name: "{{ open.name }}"
|
|
|
|
|
state: closed
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: close_idem_check
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
#- close_check is changed
|
|
|
|
|
- close_check is changed
|
|
|
|
|
- close is changed
|
|
|
|
|
- close_idem is not changed
|
|
|
|
|
#- close_idem_check is not changed
|
|
|
|
|
- close_idem_check is not changed
|
|
|
|
|
|
|
|
|
|
- name: Re-open
|
|
|
|
|
luks_device:
|
|
|
|
@ -113,13 +113,13 @@
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
|
|
#- name: Closed (via device, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: closed
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: close_check
|
|
|
|
|
- name: Closed (via device, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: closed
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: close_check
|
|
|
|
|
- name: Closed (via device)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
@ -132,19 +132,19 @@
|
|
|
|
|
state: closed
|
|
|
|
|
become: yes
|
|
|
|
|
register: close_idem
|
|
|
|
|
#- name: Closed (via device, idempotent, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: closed
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: close_idem_check
|
|
|
|
|
- name: Closed (via device, idempotent, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: closed
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: close_idem_check
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
#- close_check is changed
|
|
|
|
|
- close_check is changed
|
|
|
|
|
- close is changed
|
|
|
|
|
- close_idem is not changed
|
|
|
|
|
#- close_idem_check is not changed
|
|
|
|
|
- close_idem_check is not changed
|
|
|
|
|
|
|
|
|
|
- name: Re-opened
|
|
|
|
|
luks_device:
|
|
|
|
@ -153,13 +153,13 @@
|
|
|
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
|
|
|
become: yes
|
|
|
|
|
|
|
|
|
|
#- name: Absent (check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: absent
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: absent_check
|
|
|
|
|
- name: Absent (check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: absent
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: absent_check
|
|
|
|
|
- name: Absent
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
@ -172,16 +172,16 @@
|
|
|
|
|
state: absent
|
|
|
|
|
become: yes
|
|
|
|
|
register: absent_idem
|
|
|
|
|
#- name: Absent (idempotence, check)
|
|
|
|
|
# luks_device:
|
|
|
|
|
# device: "{{ cryptfile_device }}"
|
|
|
|
|
# state: absent
|
|
|
|
|
# check_mode: yes
|
|
|
|
|
# become: yes
|
|
|
|
|
# register: absent_idem_check
|
|
|
|
|
- name: Absent (idempotence, check)
|
|
|
|
|
luks_device:
|
|
|
|
|
device: "{{ cryptfile_device }}"
|
|
|
|
|
state: absent
|
|
|
|
|
check_mode: yes
|
|
|
|
|
become: yes
|
|
|
|
|
register: absent_idem_check
|
|
|
|
|
- assert:
|
|
|
|
|
that:
|
|
|
|
|
#- absent_check is changed
|
|
|
|
|
- absent_check is changed
|
|
|
|
|
- absent is changed
|
|
|
|
|
- absent_idem is not changed
|
|
|
|
|
#- absent_idem_check is not changed
|
|
|
|
|
- absent_idem_check is not changed
|
|
|
|
|