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.
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
---
|
|
- name: Create with invalid device name (check)
|
|
luks_device:
|
|
device: /dev/asdfasdfasdf
|
|
state: present
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
check_mode: yes
|
|
ignore_errors: yes
|
|
become: yes
|
|
register: create_check
|
|
- name: Create with invalid device name
|
|
luks_device:
|
|
device: /dev/asdfasdfasdf
|
|
state: present
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
ignore_errors: yes
|
|
become: yes
|
|
register: create
|
|
- assert:
|
|
that:
|
|
- create_check is failed
|
|
- create is failed
|
|
- "'o such file or directory' in create_check.msg"
|
|
- "'o such file or directory' in create.msg"
|
|
|
|
- name: Create with something which is not a device (check)
|
|
luks_device:
|
|
device: /tmp/
|
|
state: present
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
check_mode: yes
|
|
ignore_errors: yes
|
|
become: yes
|
|
register: create_check
|
|
- name: Create with something which is not a device
|
|
luks_device:
|
|
device: /tmp/
|
|
state: present
|
|
keyfile: "{{ role_path }}/files/keyfile1"
|
|
ignore_errors: yes
|
|
become: yes
|
|
register: create
|
|
- assert:
|
|
that:
|
|
- create_check is failed
|
|
- create is failed
|
|
- "'is not a device' in create_check.msg"
|
|
- "'is not a device' in create.msg"
|