Files
base/tasks/date.yml
2025-11-20 17:53:37 +01:00

19 lines
535 B
YAML

---
- name: base | install ntp
apt:
name: ntp
state: present
when: ansible_distribution == 'Debian' and ansible_distribution_major_version | int < 13
- name: base | ensure ntp is running
service:
name: ntp
state: started
enabled: yes
when: ansible_distribution == 'Debian' and ansible_distribution_major_version | int < 13
- name: base | set date
shell:
cmd: /usr/bin/timedatectl set-timezone Europe/Paris
when: ansible_distribution == 'Debian' and ansible_distribution_major_version | int >= 13