From 5e34685a075948baa834e60b637766ef8a9d6da1 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Sun, 13 Oct 2024 16:37:39 -0400 Subject: [PATCH] fix ntp --- ansible/playbooks/ntp.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ansible/playbooks/ntp.yml b/ansible/playbooks/ntp.yml index dccd146..7097814 100644 --- a/ansible/playbooks/ntp.yml +++ b/ansible/playbooks/ntp.yml @@ -10,13 +10,12 @@ state: present update_cache: yes - - name: Configure timesyncd to use the router's NTP server - lineinfile: + - name: Configure timesyncd to use the router's NTP server using ini_file + ini_file: path: /etc/systemd/timesyncd.conf - regexp: '^NTP=' - line: 'NTP=10.0.0.1' - insertafter: '^\[Time\]' - state: present + section: Time + option: NTP + value: '10.0.0.1' - name: Restart systemd-timesyncd to apply changes systemd: