Use assert instead of fail, looks better

also set msg
This commit is contained in:
Sven Velt 2020-12-03 23:47:42 +01:00
parent 99642a10e4
commit 2bced02a22

View file

@ -1,8 +1,10 @@
--- ---
- name: Check selected timesync daemon - name: Check selected timesync daemon
fail: assert:
fail_msg: "{{ timesync_daemon|default('No daemon') }} not supported" that:
when: timesync_daemon not in [ "busybox-ntp", "chrony", "ntp", "timesyncd" ] - 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 - name: Include each network variables if there is no host variable