From 92c23bc2b5206e688404c70f2e38929f4dd1a5ae Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 11 Feb 2021 23:17:34 +0200 Subject: [PATCH] roles/common: Use chrony for NTP on Alpine --- roles/common/tasks/ntp.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/roles/common/tasks/ntp.yml b/roles/common/tasks/ntp.yml index e56e491..f6c2542 100644 --- a/roles/common/tasks/ntp.yml +++ b/roles/common/tasks/ntp.yml @@ -1,6 +1,7 @@ --- # Hosts running Ubuntu 16.04+ and Debian 9+ use systemd init system and should # use timedatectl as a network time client instead of the standalone ntp client. +# Alpine can use chrony. - name: Set timezone when: timezone is defined and ansible_service_mgr == 'systemd' @@ -15,4 +16,8 @@ apt: name=ntp state=absent update_cache=yes when: ansible_service_mgr == 'systemd' +- name: Install chronyd on Alpine + apt: name=chrony state=present + when: ansible_distribution == 'Alpine' + # vim: set ts=2 sw=2: