wip timesyncd
This commit is contained in:
parent
b8b48bbcb9
commit
65a9dc0967
|
@ -103,7 +103,8 @@ evolinux_system_locales: True
|
|||
|
||||
evolinux_system_set_timezone: True
|
||||
evolinux_system_timezone: "Europe/Paris"
|
||||
evolinux_system_include_ntpd: true
|
||||
evolinux_system_include_ntpd: False
|
||||
evolinux_system_include_timesyncd: True
|
||||
|
||||
evolinux_system_vim_skip_defaults: True
|
||||
evolinux_system_vim_default_editor: True
|
||||
|
@ -232,4 +233,4 @@ evolinux_cron_checkhpraid_frequency: daily
|
|||
evolinux_motd_include: True
|
||||
|
||||
# Utils
|
||||
evolinux_utils_include: True
|
||||
evolinux_utils_include: True
|
||||
|
|
3
timesyncd/defaults/main.yml
Normal file
3
timesyncd/defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
ntp_servers:
|
||||
- 'ntp.evolix.net'
|
5
timesyncd/handlers/main.yml
Normal file
5
timesyncd/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Restart timesyncd
|
||||
ansible.builtin.service:
|
||||
name: systemd-timesyncd.service
|
||||
state: restarted
|
30
timesyncd/tasks/main.yml
Normal file
30
timesyncd/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Install systemd-timesyncd package
|
||||
ansible.builtin.apt:
|
||||
name: systemd-timesyncd
|
||||
state: present
|
||||
tags:
|
||||
- timesyncd
|
||||
|
||||
- name: Remove openntpd package
|
||||
ansible.builtin.apt:
|
||||
name: openntpd
|
||||
state: absent
|
||||
tags:
|
||||
- timesyncd
|
||||
|
||||
- name: Remove ntp package
|
||||
ansible.builtin.apt:
|
||||
name: ntp
|
||||
state: absent
|
||||
tags:
|
||||
- timesyncd
|
||||
|
||||
- name: Copy timesyncd config
|
||||
ansible.builtin.template:
|
||||
src: timesyncd.conf.j2
|
||||
dest: /etc/systemd/timesyncd.conf.d/evolix.conf
|
||||
mode: "0644"
|
||||
notify: Restart timesyncd
|
||||
tags:
|
||||
- timesyncd
|
3
timesyncd/templates/timesyncd.conf.j2
Normal file
3
timesyncd/templates/timesyncd.conf.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
# {{ ansible_managed }}
|
||||
[Time]
|
||||
NTP="{{ ntp_servers | join(' ') }}"
|
Loading…
Reference in a new issue