vm-ansible/roles/common/tasks/timesync.yaml

20 lines
512 B
YAML
Raw Normal View History

---
- name: Setup timesync config
2023-03-05 19:00:38 +01:00
ansible.builtin.template:
src: timesyncd.conf.template
dest: /etc/systemd/timesyncd.conf
notify: run Timedatectl
when: ansible_service_mgr == "systemd"
- name: set Timezone
2023-03-05 19:00:38 +01:00
ansible.builtin.timezone: name={{ timedatectl_timezone }}
when: ansible_service_mgr == "systemd"
- name: Reastart timesyncd to apply changes
when: ansible_service_mgr == "systemd"
ansible.builtin.systemd:
state: restarted
daemon_reload: yes
name: systemd-timesyncd
2022-04-16 19:55:29 +02:00
...