mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
871 B
YAML
32 lines
871 B
YAML
5 years ago
|
---
|
||
|
- name: Create with keysize
|
||
|
luks_device:
|
||
|
device: "{{ cryptfile_device }}"
|
||
|
state: present
|
||
|
keyfile: "{{ role_path }}/files/keyfile1"
|
||
|
keysize: 256
|
||
|
become: yes
|
||
|
register: create_with_keysize
|
||
|
- name: Create with keysize (idempotent)
|
||
|
luks_device:
|
||
|
device: "{{ cryptfile_device }}"
|
||
|
state: present
|
||
|
keyfile: "{{ role_path }}/files/keyfile1"
|
||
|
keysize: 256
|
||
|
become: yes
|
||
|
register: create_idem_with_keysize
|
||
|
- name: Create with different keysize (idempotent since we do not update keysize)
|
||
|
luks_device:
|
||
|
device: "{{ cryptfile_device }}"
|
||
|
state: present
|
||
|
keyfile: "{{ role_path }}/files/keyfile1"
|
||
|
keysize: 512
|
||
|
become: yes
|
||
|
register: create_idem_with_diff_keysize
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- create_with_keysize is changed
|
||
|
- create_idem_with_keysize is not changed
|
||
|
- create_idem_with_diff_keysize is not changed
|