diff --git a/compress-logrotate.yml b/compress-logrotate.yml new file mode 100644 index 0000000..4fb978a --- /dev/null +++ b/compress-logrotate.yml @@ -0,0 +1,12 @@ +- hosts: all + become: true + tasks: + - name: decomment compress option in logrotate + lineinfile: + path: /etc/logrotate.conf + regexp: "^#compress" + line: "compress" + notify: force rotation + handlers: + - name: force rotation + command: logrotate -f /etc/logrotate.conf diff --git a/journald-size.yml b/journald-size.yml new file mode 100644 index 0000000..e3a99c5 --- /dev/null +++ b/journald-size.yml @@ -0,0 +1,14 @@ +- hosts: all + become: true + tasks: + - name: Update journald conf + lineinfile: + regexp: "^.*SystemMaxUse.*$" + line: SystemMaxUse=500M + path: /etc/systemd/journald.conf + notify: restart journald + handlers: + - name: restart journald + service: + name: systemd-journald + state: restarted