Files
ansible-role-debian_common/tasks/edit-journald.yml
Jose 00eafd9e44 fix 🐛: Remove ansible_remote_tmp
This commit removes the `ansible_remote_tmp` variable definition to resolve warnings related to auto-created temporary directories. This change ensures the system adheres to best practices and avoids potential issues with temporary file management during Ansible execution. The removal simplifies the configuration and improves the overall stability of the deployment process.
2025-12-13 08:32:04 +01:00

21 lines
735 B
YAML

---
- name: Edit journald.conf
ansible.builtin.lineinfile:
path: /etc/systemd/journald.conf
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
state: "{{ item.state | default('present') }}"
with_items:
- { regexp: "^#?Storage", line: Storage=volatile }
- { regexp: "^#?ForwardToSyslog", line: ForwardToSyslog=no }
- { regexp: "^#?SystemMaxUse", line: SystemMaxUse=100M }
notify: Restart systemd-journald
# vars:
# ansible_remote_tmp: /tmp # Prevent warnings for auto-created tmp dir
# A succesful vacuum does impact log size, but is not considered a change
- name: Vacuum journalctl before
ansible.builtin.command: journalctl --vacuum-size=10M
register: vacuumresult
changed_when: false