Network var file allowed but not necessary

This commit is contained in:
Sven Velt 2020-12-03 14:47:57 +01:00
parent fded1ab8f4
commit ed928c20c7

View file

@ -6,8 +6,10 @@
- name: Include each network variables if there is no host variable
include_vars: "vars/timesync_{{ ansible_default_ipv4.network }}.yml"
when: ansible_default_ipv4 and (timesync_servers|default(False) == False and timesync_pools|default(False) == False)
include_vars: "{{ timesync_varfile_network }}"
vars:
timesync_varfile_network: "vars/timesync_{{ ansible_default_ipv4.network }}.yml"
when: ansible_default_ipv4 and timesync_varfile_network is file and (timesync_servers|default(False) == False and timesync_pools|default(False) == False)
- name: "Set NTP »pools« for machines without default gateway"