roles_timesync/roles/timesync-enabled/tasks/main.yml

21 lines
543 B
YAML
Raw Normal View History

2017-11-30 14:28:28 +00:00
---
- 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
2018-04-22 12:10:27 +00:00
- include_tasks: timesync_timesyncd.yml
2017-11-30 14:28:28 +00:00
when: timesync_daemon == "timesyncd"
2018-04-22 12:10:27 +00:00
- include_tasks: timesync_ntp.yml
2017-11-30 14:28:28 +00:00
when: timesync_daemon not in ["timesyncd", ]