Skip to content

Commit 5e34685

Browse files
committedOct 13, 2024
fix ntp
1 parent 3ee1613 commit 5e34685

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

‎ansible/playbooks/ntp.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010
state: present
1111
update_cache: yes
1212

13-
- name: Configure timesyncd to use the router's NTP server
14-
lineinfile:
13+
- name: Configure timesyncd to use the router's NTP server using ini_file
14+
ini_file:
1515
path: /etc/systemd/timesyncd.conf
16-
regexp: '^NTP='
17-
line: 'NTP=10.0.0.1'
18-
insertafter: '^\[Time\]'
19-
state: present
16+
section: Time
17+
option: NTP
18+
value: '10.0.0.1'
2019

2120
- name: Restart systemd-timesyncd to apply changes
2221
systemd:

0 commit comments

Comments
 (0)
Please sign in to comment.