ansible-ffibk/roles/service-ntpd/tasks/main.yml

26 lines
439 B
YAML
Raw Normal View History

---
- name: ensure systemd-timesyncd is disabled
systemd:
name: systemd-timesyncd
enabled: no
state: stopped
- name: install ntp packages
apt:
state: present
name: "{{ item }}"
update_cache: yes
cache_valid_time: 21600
with_items:
- ntp
- ntp-doc
- ntpdate
- ntpstat
- name: enable and start ntp daemon
systemd:
name: ntp
enabled: yes
state: started
daemon_reload: yes