feat: enable chrony-wait service (#2)
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #2
This commit is contained in:
Robert Kaussow 2023-06-05 22:04:10 +02:00
parent 5ab2044b9c
commit 8248d716b6
11 changed files with 45 additions and 14 deletions

View File

@ -41,7 +41,7 @@ local PipelineLinting = {
},
};
local PipelineDeployment(scenario='rocky8') = {
local PipelineDeployment(scenario='rocky9') = {
kind: 'pipeline',
name: 'testing-' + scenario,
platform: {
@ -71,7 +71,7 @@ local PipelineDeployment(scenario='rocky8') = {
'linting',
],
trigger: {
ref: ['refs/heads/main', 'refs/tags/**'],
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
};
@ -115,7 +115,7 @@ local PipelineDocumentation = {
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
},
depends_on: [
'testing-rocky8',
'testing-rocky9',
],
};
@ -153,7 +153,7 @@ local PipelineNotification = {
[
PipelineLinting,
PipelineDeployment(scenario='rocky8'),
PipelineDeployment(scenario='rocky9'),
PipelineDocumentation,
PipelineNotification,
]

View File

@ -36,7 +36,7 @@ trigger:
---
kind: pipeline
name: testing-rocky8
name: testing-rocky9
platform:
os: linux
@ -53,7 +53,7 @@ steps:
- name: ansible-molecule
image: thegeeklab/molecule:4
commands:
- molecule test -s rocky8
- molecule test -s rocky9
environment:
HCLOUD_TOKEN:
from_secret: hcloud_token
@ -62,6 +62,7 @@ trigger:
ref:
- refs/heads/main
- refs/tags/**
- refs/pull/**
depends_on:
- linting
@ -107,7 +108,7 @@ trigger:
- refs/pull/**
depends_on:
- testing-rocky8
- testing-rocky9
---
kind: pipeline
@ -147,6 +148,6 @@ depends_on:
---
kind: signature
hmac: 96908282833168a632002f8bf7c4be4f7577d84dad0016ca15e4232a64829650
hmac: b7a44b7df8263dae322f071146976aa945dda4857876c3b98475dd725a6f28c6
...

View File

@ -1 +1 @@
rocky8/
rocky9

View File

@ -9,8 +9,8 @@ dependency:
driver:
name: delegated
platforms:
- name: rocky8-chrony
image: rocky-8
- name: rocky9-wireguard
image: rocky-9
server_type: cx11
lint: |
/usr/local/bin/flake8

View File

@ -5,6 +5,17 @@
name: chrony
state: present
- name: Create required directories
loop:
- name: /etc/systemd/system/time-sync.target.d
mode: "0755"
loop_control:
label: "{{ item.name }}"
file:
path: "{{ item.name }}"
state: directory
mode: "{{ item.mode }}"
- name: Deploy configuration file
template:
src: etc/chrony.conf.j2
@ -23,11 +34,26 @@
mode: 0644
notify: __chrony_restart
- name: Ensure service is up and running
- name: Deploy time-sync.target override file
template:
src: etc/systemd/system/time-sync.target.d/requires.conf.j2
dest: /etc/systemd/system/time-sync.target.d/requires.conf
owner: root
group: root
mode: 0644
notify: __chrony_restart
- name: Ensure chronyd is up and running
systemd:
name: chronyd.service
state: started
daemon_reload: True
enabled: True
- name: Ensure chrony-wait is enabled
systemd:
name: chrony-wait.service
daemon_reload: True
enabled: True
become: True
become_user: root

View File

@ -0,0 +1,4 @@
#jinja2: lstrip_blocks: True
{{ ansible_managed | comment }}
[Unit]
Requires=chrony-wait.service