From: Frank Brehm Date: Mon, 13 Nov 2017 10:30:16 +0000 (+0100) Subject: Moving some logrotate definitions to more common places X-Git-Tag: v0.1.0~2077^2~5 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ed6b818c2a78f85fae5238623e450936bf5c176c;p=pixelpark%2Fhiera.git Moving some logrotate definitions to more common places --- diff --git a/common.yaml b/common.yaml index 727b9391..797af247 100644 --- a/common.yaml +++ b/common.yaml @@ -22,6 +22,47 @@ rsyslog::client::log_remote: true rsyslog::client::remote_type: 'udp' rsyslog::client::server: 'loghost.pixelpark.com' +##################################################### +# Logrotation + +infra::profile::logrotate::config: + rotate_every: 'week' + rotate: 4 + create: true + dateext: true + compress: true + delaycompress: true + missingok: true + mail: false + olddir: false + ifempty: false + +infra::profile::logrotate::rules: + wtmp: + path: '/var/log/wtmp' + missingok: true + dateext: true + rotate_every: 'month' + create: true + create_mode: '0664' + create_owner: 'root' + create_group: 'utmp' + minsize: '1M' + rotate: 12 + btmp: + path: '/var/log/btmp' + missingok: true + dateext: true + rotate_every: 'month' + create: true + create_mode: '0600' + create_owner: 'root' + create_group: 'utmp' + minsize: '1M' + rotate: 1 + +##################################################### +# Account definitions accounts::users: philipp.dallig: @@ -1038,3 +1079,5 @@ accounts::users: shell: "nologin" sudo: false uid: 20031 + +# vim: et list diff --git a/customer/pixelpark-mail/common.yaml b/customer/pixelpark-mail/common.yaml index bf2b4c46..c3951807 100644 --- a/customer/pixelpark-mail/common.yaml +++ b/customer/pixelpark-mail/common.yaml @@ -109,43 +109,13 @@ rsyslog::client::log_local_custom: # Logrotation infra::profile::logrotate::config: - rotate_every: 'week' - rotate: 4 - create: true - dateext: true dateformat: '-%Y-%m-%d' - compress: true - delaycompress: true - missingok: true - mail: false - olddir: false - ifempty: false infra::profile::logrotate::rules: wtmp: - path: '/var/log/wtmp' - missingok: true - dateext: true dateformat: '-%Y-%m-%d' - rotate_every: 'month' - create: true - create_mode: '0664' - create_owner: 'root' - create_group: 'utmp' - minsize: '1M' - rotate: 12 btmp: - path: '/var/log/btmp' - missingok: true - dateext: true dateformat: '-%Y-%m-%d' - rotate_every: 'month' - create: true - create_mode: '0600' - create_owner: 'root' - create_group: 'utmp' - minsize: '1M' - rotate: 1 named: path: '/var/log/named/*.log' rotate_every: 'day' @@ -182,3 +152,4 @@ infra::profile::logrotate::rules: /usr/bin/systemctl reload named-sdb-chroot.service > /dev/null 2>&1 || true /usr/bin/systemctl reload named-pkcs11.service > /dev/null 2>&1 || true +# vim: et list diff --git a/customer/pixelpark-mail/test-mail02.pixelpark.net.yaml b/customer/pixelpark-mail/test-mail02.pixelpark.net.yaml index 5d54d72e..0aecf722 100644 --- a/customer/pixelpark-mail/test-mail02.pixelpark.net.yaml +++ b/customer/pixelpark-mail/test-mail02.pixelpark.net.yaml @@ -37,9 +37,6 @@ infra::profile::sasl::application: # Rsyslog configuration # Logrotation -infra::profile::logrotate::config: - dateformat: '-%Y-%m-%d' - infra::profile::logrotate::rules: samba: path: '/var/log/samba/*' @@ -51,4 +48,4 @@ infra::profile::logrotate::rules: copytruncate: true sharedscripts: true -# vim: et +# vim: et list diff --git a/os/RedHat-7.yaml b/os/RedHat-7.yaml new file mode 100644 index 00000000..2464f2e2 --- /dev/null +++ b/os/RedHat-7.yaml @@ -0,0 +1,15 @@ +--- + +##################################################### +# Logrotation + +infra::profile::logrotate::config: + dateformat: '-%Y-%m-%d' + +infra::profile::logrotate::rules: + wtmp: + dateformat: '-%Y-%m-%d' + btmp: + dateformat: '-%Y-%m-%d' + +# vim: et list