summaryrefslogtreecommitdiff
path: root/manifests/base.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-10-21 13:11:55 +0200
committermh <mh@immerda.ch>2012-10-21 13:11:55 +0200
commited10e300520c5e92b129d3b5f503793bd4331ade (patch)
tree3bbe50cfa5502ef3ef0173fb48006c4b04a3ad65 /manifests/base.pp
parent682bfbb0cb1a80e86a552fe2e1411ae654c757e1 (diff)
downloadpuppet-lighttpd-ed10e300520c5e92b129d3b5f503793bd4331ade.tar.gz
puppet-lighttpd-ed10e300520c5e92b129d3b5f503793bd4331ade.tar.bz2
register additional configs
Diffstat (limited to 'manifests/base.pp')
-rw-r--r--manifests/base.pp66
1 files changed, 40 insertions, 26 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 33acefd..0f942a5 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,36 +1,50 @@
+# manages the base stuff of
+# a lighttpd server
class lighttpd::base {
package{'lighttpd':
ensure => installed,
}
- service{lighttpd:
- ensure => running,
- enable => true,
+ service{'lighttpd':
+ ensure => running,
+ enable => true,
hasstatus => true,
- require => Package[lighttpd],
+ require => Package['lighttpd'],
}
- file{'/etc/lighttpd/lighttpd.conf':
- source => [ "puppet:///modules/site_lighttpd/${::fqdn}/lighttpd.conf",
- "puppet:///modules/site_lighttpd/lighttpd.conf",
- "puppet:///modules/lighttpd/${::operatingsystem}/lighttpd.conf",
- "puppet:///modules/lighttpd/lighttpd.conf" ],
- require => Package['lighttpd'],
- notify => Service['lighttpd'],
- owner => root, group => 0, mode => 0644;
- }
-
- # ToDo: put that in a common module to share with apache
- file { 'default_lighttpd_index':
- path => '/var/www/lighttpd/index.html',
- ensure => file,
- content => template('lighttpd/default/default_index.erb'),
- owner => root, group => 0, mode => 0644;
- }
-
- file{'/etc/cron.daily/clean_lighttpd_compress':
- content => "find /var/cache/lighttpd/compress -type f -mtime +10 | xargs -r rm\n",
- require => Package['lighttpd'],
- owner => root, group => 0, mode => 0640;
+ file{
+ '/etc/lighttpd/lighttpd.conf':
+ source => [ "puppet:///modules/site_lighttpd/${::fqdn}/lighttpd.conf",
+ 'puppet:///modules/site_lighttpd/lighttpd.conf',
+ "puppet:///modules/lighttpd/${::operatingsystem}/lighttpd.conf",
+ 'puppet:///modules/lighttpd/lighttpd.conf' ],
+ require => Package['lighttpd'],
+ notify => Service['lighttpd'],
+ owner => 'root',
+ group => 0,
+ mode => '0644';
+ # ToDo: put that in a common module to share with apache
+ 'default_lighttpd_index':
+ ensure => file,
+ path => '/var/www/lighttpd/index.html',
+ content => template('lighttpd/default/default_index.erb'),
+ require => Package['lighttpd'],
+ before => Service['lighttpd'],
+ owner => 'root',
+ group => 0,
+ mode => '0644';
+ "${lighttpd::conf_dir}/config.conf":
+ ensure => file,
+ require => Package['lighttpd'],
+ before => Service['lighttpd'],
+ owner => 'root',
+ group => 0,
+ mode => '0644';
+ '/etc/cron.daily/clean_lighttpd_compress':
+ content => "find /var/cache/lighttpd/compress -type f -mtime +10 | xargs -r rm\n",
+ require => Package['lighttpd'],
+ owner => 'root',
+ group => 0,
+ mode => '0640';
}
}