Add base_config and deploy_systemd_journal_config

This commit is contained in:
chris 2025-01-19 20:30:05 +01:00
parent 93212e2248
commit 328ec744cc
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak
6 changed files with 48 additions and 18 deletions
roles
base_config/meta
deploy_systemd_journal_config

View file

@ -0,0 +1,4 @@
---
dependencies:
- role: deploy_ssh_server_config
- role: deploy_systemd_journal_config

View file

@ -0,0 +1,3 @@
[Journal]
MaxFileSec=2day
MaxRetentionSec=2week

View file

@ -0,0 +1,5 @@
- name: Restart `systemd-journald.service`
ansible.builtin.systemd:
name: systemd-journald.service
state: restarted
become: true

View file

@ -0,0 +1,18 @@
- name: Create 'journald.conf.d' directory if it does not exist
ansible.builtin.file:
path: "/etc/systemd/journald.conf.d"
state: directory
mode: '0644'
owner: root
group: root
become: true
- name: make sure the custom configuration file is deployed
ansible.builtin.copy:
src: "10-ccchh.conf"
dest: "/etc/systemd/journald.conf.d/10-ccchh.conf"
mode: "0644"
owner: root
group: root
become: true
notify: Restart `systemd-journald.service`