From aed708e82f20cf9aed6666e0a02692c533a794b9 Mon Sep 17 00:00:00 2001 From: Thomas Schneider <thomas@fsmpi.rwth-aachen.de> Date: Sun, 17 Nov 2019 12:39:52 +0100 Subject: [PATCH] =?UTF-8?q?Template=20logrotate.conf=20for=20=E2=89=A5=20B?= =?UTF-8?q?uster?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic-system/tasks/logging.yml | 4 ++-- .../{files/logrotate.conf => templates/logrotate.conf.j2} | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) rename basic-system/{files/logrotate.conf => templates/logrotate.conf.j2} (90%) diff --git a/basic-system/tasks/logging.yml b/basic-system/tasks/logging.yml index 73ce55c..9840232 100644 --- a/basic-system/tasks/logging.yml +++ b/basic-system/tasks/logging.yml @@ -98,8 +98,8 @@ - syslog - name: ensure our logrotate.conf is present - copy: - src: logrotate.conf + template: + src: logrotate.conf.j2 dest: /etc/logrotate.conf owner: root group: root diff --git a/basic-system/files/logrotate.conf b/basic-system/templates/logrotate.conf.j2 similarity index 90% rename from basic-system/files/logrotate.conf rename to basic-system/templates/logrotate.conf.j2 index 0e3ac37..2be8fd5 100644 --- a/basic-system/files/logrotate.conf +++ b/basic-system/templates/logrotate.conf.j2 @@ -15,6 +15,7 @@ delaycompress # packages drop log rotation information into this directory include /etc/logrotate.d +{% if ansible_distribution_major_version|int < 10 %} # no packages own wtmp, or btmp -- we'll rotate them here /var/log/wtmp { missingok @@ -29,5 +30,6 @@ include /etc/logrotate.d create 0660 root utmp rotate 1 } +{% endif %} # system-specific logs may be configured here -- GitLab