From d9686a8142ba18d83d88ded3751db9060b9814ca Mon Sep 17 00:00:00 2001 From: Cosmin Dumitru Date: Mon, 24 Mar 2014 10:41:35 +0100 Subject: [PATCH] added logrotate to bind log --- bind/config.sls | 10 ++++++++++ bind/files/debian/logrotate_bind | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 bind/files/debian/logrotate_bind diff --git a/bind/config.sls b/bind/config.sls index b6fd090..c0ff2a4 100644 --- a/bind/config.sls +++ b/bind/config.sls @@ -106,6 +106,16 @@ bind_default_zones: - user: root - group: bind - mode: 775 + - template: jinja + + +/etc/logrotate.d/bind9: + file: + - managed + - source: salt://bind/files/debian/logrotate_bind + - user: root + - group: root + {% endif %} {% for key,args in salt['pillar.get']('bind:configured_zones', {}).iteritems() -%} diff --git a/bind/files/debian/logrotate_bind b/bind/files/debian/logrotate_bind new file mode 100644 index 0000000..09eab0b --- /dev/null +++ b/bind/files/debian/logrotate_bind @@ -0,0 +1,10 @@ +/var/log/bind9/query.log { + rotate 7 + daily + missingok + notifempty + sharedscripts + copytruncate + compress + create 0664 bind root +}