roles_timesync/roles/timesync-enabled/tasks/main.yml
2017-11-30 15:28:28 +01:00

21 lines
531 B
YAML

---
- 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 is not defined
- name: Set NTP server for machines without default gateway
set_fact:
timesync_servers: "{{ timesync_default_servers }}"
when: timesync_servers is not defined
- include: timesync_timesyncd.yml
when: timesync_daemon == "timesyncd"
- include: timesync_ntp.yml
when: timesync_daemon not in ["timesyncd", ]