ansible-role-grub/tasks/assert.yml

37 lines
813 B
YAML
Raw Normal View History

2020-06-26 13:00:27 +02:00
---
- name: test if grub_timeout is set correctly
assert:
that:
- grub_timeout is defined
- grub_timeout | int >= 0
2020-08-19 21:36:46 +02:00
quiet: yes
2020-06-26 13:00:27 +02:00
2020-08-23 15:22:37 +02:00
- name: test if grub_recordfail_timeout is set correctly
assert:
that:
- grub_recordfail_timeout is defined
- grub_recordfail_timeout | int >= 0
quiet: yes
2020-06-26 13:00:27 +02:00
- name: test if grub_options is set correctly
assert:
that:
- grub_options | length > 0
- grub_options is iterable
2020-08-19 21:36:46 +02:00
quiet: yes
2020-06-26 13:00:27 +02:00
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
2020-07-02 12:04:39 +02:00
quiet: yes
2020-06-26 13:00:27 +02:00
loop: "{{ grub_options }}"
2020-07-15 09:23:15 +02:00
loop_control:
label: "{{ item.option }}"
2020-06-26 13:00:27 +02:00
when:
- grub_options is defined