summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authorDavid Shrewsbury <shrewsbury.dave@gmail.com>2012-05-07 16:19:07 -0400
committerDavid Shrewsbury <shrewsbury.dave@gmail.com>2012-05-07 16:24:42 -0400
commit9a04df09ebcda4cee1ab4a599b85fe0c97ccdb41 (patch)
treecaeed8048abc7858382d23c890226392c8c49278 /manifests/init.pp
Added new logrotate puppet module.
Allows us to easily manage log rotation. Example: logrotate::file { 'xyz': log => '/var/log/xyz.log', options => ['compress', 'weekly'], } Change-Id: I84fa3a20e0510a1273aa9b8555da0dde4613f50a
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp16
1 files changed, 16 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
new file mode 100644
index 0000000..ec29bc8
--- /dev/null
+++ b/manifests/init.pp
@@ -0,0 +1,16 @@
1# Adapted from http://projects.puppetlabs.com/projects/1/wiki/Logrotate_Patterns
2
3class logrotate {
4
5 package { "logrotate":
6 ensure => latest,
7 }
8
9 file { "/etc/logrotate.d":
10 ensure => directory,
11 owner => root,
12 group => root,
13 mode => 755,
14 require => Package["logrotate"],
15 }
16}