diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-08-10 22:10:25 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2016-08-10 22:21:41 +0200 |
commit | 91a2b30dd703c827deebfb69f1b5561773beac00 (patch) | |
tree | 040f7d007bb826200c6904983ba54d04642851c8 /modules/base_configuration/manifests | |
parent | a37e5d7a961b6f6373c4f91e6c114d81e2e3261b (diff) | |
download | Puppet-91a2b30dd703c827deebfb69f1b5561773beac00.tar.gz Puppet-91a2b30dd703c827deebfb69f1b5561773beac00.tar.zst Puppet-91a2b30dd703c827deebfb69f1b5561773beac00.zip |
Add logrotate
Diffstat (limited to 'modules/base_configuration/manifests')
-rw-r--r-- | modules/base_configuration/manifests/init.pp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/base_configuration/manifests/init.pp b/modules/base_configuration/manifests/init.pp index f432e29..2b20a0e 100644 --- a/modules/base_configuration/manifests/init.pp +++ b/modules/base_configuration/manifests/init.pp | |||
@@ -59,6 +59,39 @@ class base_configuration ( | |||
59 | include => '/etc/pacman.d/mirrorlist' | 59 | include => '/etc/pacman.d/mirrorlist' |
60 | } | 60 | } |
61 | 61 | ||
62 | class { '::logrotate': | ||
63 | manage_cron_daily => false, | ||
64 | config => { | ||
65 | rotate_every => 'week', | ||
66 | rotate => 4, | ||
67 | create => true, | ||
68 | compress => true, | ||
69 | olddir => '/var/log/old', | ||
70 | tabooext => "+ .pacorig .pacnew .pacsave", | ||
71 | } | ||
72 | } | ||
73 | |||
74 | logrotate::rule { 'wtmp': | ||
75 | path => '/var/log/wtmp', | ||
76 | rotate_every => 'month', | ||
77 | create => true, | ||
78 | create_mode => '0664', | ||
79 | create_owner => 'root', | ||
80 | create_group => 'utmp', | ||
81 | rotate => '1', | ||
82 | minsize => '1M', | ||
83 | } | ||
84 | logrotate::rule { 'btmp': | ||
85 | path => '/var/log/btmp', | ||
86 | missingok => true, | ||
87 | rotate_every => 'month', | ||
88 | create => true, | ||
89 | create_mode => '0600', | ||
90 | create_owner => 'root', | ||
91 | create_group => 'utmp', | ||
92 | rotate => '1', | ||
93 | } | ||
94 | |||
62 | ensure_packages(["whois"], { 'install_options' => '--asdeps' }) | 95 | ensure_packages(["whois"], { 'install_options' => '--asdeps' }) |
63 | class { 'fail2ban': | 96 | class { 'fail2ban': |
64 | logtarget => 'SYSLOG', | 97 | logtarget => 'SYSLOG', |