diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-24 02:22:17 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-08-29 22:46:14 +0200 |
commit | 7fed35a408b9ec37454169425823785b5fc8978b (patch) | |
tree | 28371d43ac304f99fb0a5305124858db69ef2137 /modules/base_installation/manifests/logs.pp | |
parent | ba2cf1b5d938810077b0fd73844faf432e8e8f9d (diff) | |
download | Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.gz Puppet-7fed35a408b9ec37454169425823785b5fc8978b.tar.zst Puppet-7fed35a408b9ec37454169425823785b5fc8978b.zip |
Refactor base installation module
Diffstat (limited to 'modules/base_installation/manifests/logs.pp')
-rw-r--r-- | modules/base_installation/manifests/logs.pp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/base_installation/manifests/logs.pp b/modules/base_installation/manifests/logs.pp new file mode 100644 index 0000000..558182f --- /dev/null +++ b/modules/base_installation/manifests/logs.pp | |||
@@ -0,0 +1,36 @@ | |||
1 | class base_installation::logs inherits base_installation { | ||
2 | class { '::logrotate': | ||
3 | manage_cron_daily => false, | ||
4 | config => { | ||
5 | rotate_every => 'week', | ||
6 | rotate => 4, | ||
7 | create => true, | ||
8 | compress => true, | ||
9 | olddir => '/var/log/old', | ||
10 | tabooext => "+ .pacorig .pacnew .pacsave", | ||
11 | } | ||
12 | } | ||
13 | |||
14 | logrotate::rule { 'wtmp': | ||
15 | path => '/var/log/wtmp', | ||
16 | rotate_every => 'month', | ||
17 | create => true, | ||
18 | create_mode => '0664', | ||
19 | create_owner => 'root', | ||
20 | create_group => 'utmp', | ||
21 | rotate => 1, | ||
22 | minsize => '1M', | ||
23 | } | ||
24 | logrotate::rule { 'btmp': | ||
25 | path => '/var/log/btmp', | ||
26 | missingok => true, | ||
27 | rotate_every => 'month', | ||
28 | create => true, | ||
29 | create_mode => '0600', | ||
30 | create_owner => 'root', | ||
31 | create_group => 'utmp', | ||
32 | rotate => 1, | ||
33 | } | ||
34 | |||
35 | contain "::logrotate" | ||
36 | } | ||