vn-ansible/roles/debian-base/tasks/timesync.yml

22 lines
542 B
YAML
Raw Normal View History

2024-09-23 12:30:38 +00:00
- name: Configure /etc/systemd/timesyncd.conf
lineinfile:
path: /etc/systemd/timesyncd.conf
regexp: '^#NTP'
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'
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