From 7002974f41f08ee524a6059999f45c1af6039634 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 17 Mar 2023 15:53:28 +0200 Subject: [PATCH] Add logrotate config --- tasks/configure.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/configure.yml b/tasks/configure.yml index 38ab367..2bfe688 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -167,3 +167,15 @@ daemon_reload: true name: motion_hass.timer enabled: true + + - name: Configure logrotate for HomeAssistant integration + blockinfile: + path: /etc/logrotate.d/motion_hass + block: | + /var/lib/motion/log/motion_hass.log { + daily + rotate 30 + compress + } + create: true + \ No newline at end of file