From 9f575b24d5e71a75c279e9972fd8fa3908703c8d Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Mon, 25 Mar 2019 11:40:20 +0100 Subject: [PATCH] Extra playbooks --- compress-logrotate.yml | 12 ++++++++++++ journald-size.yml | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 compress-logrotate.yml create mode 100644 journald-size.yml 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