From a2e9b07c1242f01fafb8558c136ed7abc1cb3478 Mon Sep 17 00:00:00 2001 From: Stephen C Phillips <steve@scphillips.com> Date: Mon, 18 Jun 2018 16:43:33 +0100 Subject: [PATCH] Adds NTP config to alternate vagrantfile --- Vagrantfile.libvirt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Vagrantfile.libvirt b/Vagrantfile.libvirt index 8f6a30b..39076c5 100644 --- a/Vagrantfile.libvirt +++ b/Vagrantfile.libvirt @@ -17,6 +17,21 @@ sed -i s/10.0.3/172.40.231/g /etc/default/lxc-net sed -i s/#LXC_DHCP_CONFILE/LXC_DHCP_CONFILE/g /etc/default/lxc-net service lxc-net restart +# enable NTP +# use network time to make sure we are synchronised +echo "Disabling timesyncd..." +timedatectl set-ntp no +until timedatectl | grep -m 1 "Network time on: no"; +do + echo "Waiting for timesyncd to turn off.." + sleep 1 +done +apt-get install ntp +echo "timesync set to ntpd" + +# set timezone to London +timedatectl set-timezone Europe/London + SCRIPT Vagrant.configure("2") do |config| -- GitLab