From 77d2463cefb2e3e04b61aa674be9345284960e9d Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 17 Mar 2023 15:55:56 +0200 Subject: [PATCH] add logrotates --- tasks/configure.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 2bfe688..88e2327 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -178,4 +178,25 @@ compress } create: true - \ No newline at end of file + + - name: Configure logrotate for process_motion_event + blockinfile: + path: /etc/logrotate.d/process_motion_event + block: | + /var/lib/motion/log/process_motion_event.log { + daily + rotate 30 + compress + } + create: true + + - name: Configure logrotate for send_msg + blockinfile: + path: /etc/logrotate.d/send_msg_motion + block: | + /var/lib/motion/log/send_msg.log { + daily + rotate 30 + compress + } + create: true