Use assert instead of fail, looks better
also set msg
This commit is contained in:
parent
99642a10e4
commit
2bced02a22
|
@ -1,8 +1,10 @@
|
|||
---
|
||||
- name: Check selected timesync daemon
|
||||
fail:
|
||||
fail_msg: "{{ timesync_daemon|default('No daemon') }} not supported"
|
||||
when: timesync_daemon not in [ "busybox-ntp", "chrony", "ntp", "timesyncd" ]
|
||||
- name: Check selected timesync daemon
|
||||
assert:
|
||||
that:
|
||||
- timesync_daemon in [ "busybox-ntp", "chrony", "ntp", "timesyncd" ]
|
||||
fail_msg: '{{ timesync_daemon|default("No daemon") }} not supported'
|
||||
success_msg: 'Found supported timesync service »{{ timesync_daemon }}«'
|
||||
|
||||
|
||||
- name: Include each network variables if there is no host variable
|
||||
|
|
Loading…
Reference in a new issue