Skip to content

Commit 169caf0

Browse files
committedOct 13, 2024
test ntp
1 parent 5e34685 commit 169caf0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed
 

‎ansible/playbooks/ntp.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@
1010
state: present
1111
update_cache: yes
1212

13-
- name: Configure timesyncd to use the router's NTP server using ini_file
14-
ini_file:
15-
path: /etc/systemd/timesyncd.conf
16-
section: Time
17-
option: NTP
18-
value: '10.0.0.1'
13+
- name: Configure timesyncd to use the router's NTP server
14+
shell: sed -i '/^NTP=/c\NTP=10.0.0.1' /etc/systemd/timesyncd.conf
15+
1916

2017
- name: Restart systemd-timesyncd to apply changes
2118
systemd:

0 commit comments

Comments
 (0)
Please sign in to comment.