better handle datetime / ntp regarding debian version
This commit is contained in:
@@ -1,4 +1,18 @@
|
||||
---
|
||||
- name: base | set date
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user