Compare commits

...

2 commits

Author SHA1 Message Date
David Prevot db2fd66fcd use it
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2636|6|2630|5|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/timesyncd/1//ansiblelint">Evolix » ansible-roles » timesyncd #1</a>
gitea/ansible-roles/pipeline/head This commit looks good
2023-08-24 18:25:50 +02:00
David Prevot 65a9dc0967 wip timesyncd
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2635|0|2635|0|:zzz:
gitea/ansible-roles/pipeline/head This commit looks good
2023-08-24 18:12:01 +02:00
6 changed files with 49 additions and 2 deletions

View file

@ -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

View file

@ -134,6 +134,11 @@
when:
- evolinux_system_include_ntpd | bool
- ansible.builtin.include_role:
name: evolix/timesyncd
when:
- evolinux_system_include_timesyncd | bool
## alert5
- name: Install alert5 init script (jessie/stretch)

View file

@ -0,0 +1,3 @@
---
ntp_servers:
- 'ntp.evolix.net'

View file

@ -0,0 +1,5 @@
---
- name: Restart timesyncd
ansible.builtin.service:
name: systemd-timesyncd.service
state: restarted

30
timesyncd/tasks/main.yml Normal file
View 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

View file

@ -0,0 +1,3 @@
# {{ ansible_managed }}
[Time]
NTP="{{ ntp_servers | join(' ') }}"