time_sync

Enables and starts systemd-timesyncd, unless another NTP client is already in use.

Requirements

  • systemd.
  • Privilege escalation (become: true).

Role Variables

VariableDefaultDescription
time_sync_unitsystemd-timesyncd.serviceUnit enabled and started.
time_sync_alternativeschronyd, chrony, ntpd, ntpsec and openntpd servicesNTP clients that leave time_sync_unit alone.

When one of time_sync_alternatives is enabled or running, the role changes nothing: two clients would fight over the clock.

Dependencies

None.

Example Playbook

- hosts: all
  become: true
  roles:
    - role: time_sync
      tags: [time_sync]

License

Unlicense

Author Information

pad