roles_timesync/roles/timesync-enabled/tasks/main.yml
2018-04-22 14:10:27 +02:00

21 lines
543 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_tasks: timesync_timesyncd.yml
when: timesync_daemon == "timesyncd"
- include_tasks: timesync_ntp.yml
when: timesync_daemon not in ["timesyncd", ]