ansible-role-grub/tasks/assert.yml
2020-08-19 21:36:46 +02:00

30 lines
634 B
YAML

---
- name: test if grub_timeout is set correctly
assert:
that:
- grub_timeout is defined
- grub_timeout | int >= 0
quiet: yes
- name: test if grub_options is set correctly
assert:
that:
- grub_options | length > 0
- grub_options is iterable
quiet: yes
when:
- grub_options is defined
- name: test if item in grub_options is set correctly
assert:
that:
- item.option is defined
- item.option | length > 0
- item.value is defined
quiet: yes
loop: "{{ grub_options }}"
loop_control:
label: "{{ item.option }}"
when:
- grub_options is defined