aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--modules/base_configuration/manifests/init.pp33
m---------modules/logrotate0
3 files changed, 36 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules
index 5310ea7..22459fc 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -22,3 +22,6 @@
22[submodule "modules/fail2ban"] 22[submodule "modules/fail2ban"]
23 path = modules/fail2ban 23 path = modules/fail2ban
24 url = git://git.immae.eu/github/lelutin/puppet-fail2ban 24 url = git://git.immae.eu/github/lelutin/puppet-fail2ban
25[submodule "modules/logrotate"]
26 path = modules/logrotate
27 url = git://git.immae.eu/github/yo61/puppet-logrotate.git
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',
diff --git a/modules/logrotate b/modules/logrotate
new file mode 160000
Subproject ad87cf8b589d60bdbd1bb6e9059a5bf742235ec