2024-09-23 12:30:38 +00:00
|
|
|
- name: Configure /etc/systemd/timesyncd.conf
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/systemd/timesyncd.conf
|
|
|
|
regexp: '^#NTP'
|
2024-09-27 11:26:47 +00:00
|
|
|
line: "NTP={{ time_server }}"
|
2024-09-23 12:30:38 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
|
|
|
- name: Configure /etc/systemd/timesyncd.conf
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/systemd/timesyncd.conf
|
|
|
|
regexp: '^#?FallbackNTP='
|
|
|
|
line: "FallbackNTP=ntp.roa.es"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
2024-09-27 11:26:47 +00:00
|
|
|
notify: restart systemd-timesyncd
|
2024-09-23 12:30:38 +00:00
|
|
|
- name: Service should start on boot
|
|
|
|
service:
|
2024-09-23 14:32:28 +00:00
|
|
|
name: systemd-timesyncd
|
2024-09-23 12:30:38 +00:00
|
|
|
enabled: yes
|