31 lines
819 B
YAML
31 lines
819 B
YAML
|
---
|
||
|
- name: Check if systemd-journald is running
|
||
|
service_facts:
|
||
|
ignore_errors: true
|
||
|
register: systemd_journald_services
|
||
|
|
||
|
- name: '[BLOCK] When systemd-journald is running...'
|
||
|
when: systemd_journald_services is succeeded and "systemd-journald.service" in ansible_facts.services
|
||
|
block:
|
||
|
|
||
|
- name: Create /etc/systemd/journald.conf.d
|
||
|
file:
|
||
|
path: /etc/systemd/journald.conf.d
|
||
|
state: directory
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0755
|
||
|
|
||
|
- name: Template /etc/systemd/journald.conf.d/SystemMaxUse.conf
|
||
|
template:
|
||
|
src: SystemMaxUse.conf.j2
|
||
|
dest: /etc/systemd/journald.conf.d/SystemMaxUse.conf
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: 0755
|
||
|
backup: true
|
||
|
notify:
|
||
|
- Restart systemd-journald
|
||
|
- Vaccuum journald
|
||
|
|