From d3a6e71ab8a7baf719bf2a4887ed956e511b3e58 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 22 Aug 2016 12:49:00 +0300 Subject: [PATCH] roles/common: Use service module to enable systemd NTP client instead of timedatectl The `timedatectl set-ntp on` command is actually just enabling the systemd service anyways, so it's better we use Ansible's service module. --- roles/common/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 6c88f70..e3a7ba3 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -14,7 +14,7 @@ tags: timezone - name: Enable NTP - command: /usr/bin/timedatectl set-ntp on + service: name=systemd-timesyncd enabled=yes tags: ntp - include: packages_Ubuntu.yml