main.yml 531 B

1234567891011121314151617181920
  1. ---
  2. - name: Include each network variables if there is no host variable
  3. include_vars: "vars/timesync_{{ ansible_default_ipv4.network }}.yml"
  4. when: ansible_default_ipv4 and timesync_servers is not defined
  5. - name: Set NTP server for machines without default gateway
  6. set_fact:
  7. timesync_servers: "{{ timesync_default_servers }}"
  8. when: timesync_servers is not defined
  9. - include: timesync_timesyncd.yml
  10. when: timesync_daemon == "timesyncd"
  11. - include: timesync_ntp.yml
  12. when: timesync_daemon not in ["timesyncd", ]