Compare commits

...

4 commits

Author SHA1 Message Date
David Prevot 35e7f22210 deb822-migration: Don’t keep evolix_public_old.sources on upgrade
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2633|25|2608|16|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/362//ansiblelint">Evolix » ansible-roles » unstable #362</a>
gitea/ansible-roles/pipeline/head This commit looks good
2023-09-28 15:59:16 +02:00
David Prevot b722ca822f evolinux-base: remount /usr rw before writting on it 2023-09-28 15:27:20 +02:00
David Prevot a2306e6a15 Changelog for previous commit 2023-09-28 15:27:19 +02:00
David Prevot ca67feb39e New timesyncd role used instead of ntpd by default 2023-09-28 15:27:19 +02:00
8 changed files with 63 additions and 4 deletions

View file

@ -40,6 +40,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
* userlogrotate: new version, with separate conf file
* userlogrotate: rotate also php.log
* java: allow version 17
* timesyncd: new role, used instead of ntpd by default
### Changed

View file

@ -13,7 +13,7 @@ destinations = {
".*-backports": "backports.sources",
".debian.org": "system.sources",
"mirror.evolix.org": "system.sources",
"pub.evolix.net": "evolix_public_old.sources",
"pub.evolix.net": "evolix_public_old.sources.bak",
"pub.evolix.org": "evolix_public.sources",
"artifacts.elastic.co": "elastic.sources",
"download.docker.com": "docker.sources",

View file

@ -104,7 +104,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
@ -233,4 +234,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)
@ -155,7 +160,8 @@
- evolinux_system_alert5_enable | bool
- ansible_distribution_release == "jessie" or ansible_distribution_release == "stretch"
- ansible.builtin.include_role:
name: evolix/remount-usr
- name: Install alert5 init script (buster and later)
ansible.builtin.template:

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

40
timesyncd/tasks/main.yml Normal file
View file

@ -0,0 +1,40 @@
---
- 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: Ensure /etc/systemd/timesyncd.conf.d directory exists
file:
path: /etc/systemd/timesyncd.conf.d
state: directory
mode: "755"
owner: root
group: root
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(' ') }}"