diff options
| author | mh <mh@immerda.ch> | 2012-10-21 15:09:35 +0200 | 
|---|---|---|
| committer | mh <mh@immerda.ch> | 2012-10-21 15:09:35 +0200 | 
| commit | 94b99fef7a85d9165b40e2dc01c5617824330826 (patch) | |
| tree | 43b1ffe6d6015b92e60d3f78bb7304919d7de0ee /manifests | |
| parent | e293b5be988133c04c2611ca6f5b1ab974c8d8f1 (diff) | |
| download | puppet-lighttpd-94b99fef7a85d9165b40e2dc01c5617824330826.tar.gz puppet-lighttpd-94b99fef7a85d9165b40e2dc01c5617824330826.tar.bz2  | |
this include construct is only needed on centos systems
Diffstat (limited to 'manifests')
| -rw-r--r-- | manifests/base.pp | 7 | ||||
| -rw-r--r-- | manifests/centos.pp | 21 | ||||
| -rw-r--r-- | manifests/config/file.pp | 14 | 
3 files changed, 25 insertions, 17 deletions
diff --git a/manifests/base.pp b/manifests/base.pp index 0f942a5..3f2b799 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -33,13 +33,6 @@ class lighttpd::base {        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'], diff --git a/manifests/centos.pp b/manifests/centos.pp index faa16e9..aa2bc1c 100644 --- a/manifests/centos.pp +++ b/manifests/centos.pp @@ -1,11 +1,22 @@ +# manage centos specific things for +# lighttpd  class lighttpd::centos inherits lighttpd::base { +  File{ +    require => Package['lighttpd'], +    before  => Service['lighttpd'], +  }    file{ +    "${lighttpd::conf_dir}/config.conf": +      ensure  => file, +      owner   => 'root', +      group   => 0, +      mode    => '0644';      '/var/cache/lighttpd': -      ensure => directory, -      require => Package['lighttpd']; +      ensure  => directory;      '/var/cache/lighttpd/compress': -      ensure => directory, -      require => Package['lighttpd'], -      owner => lighttpd, group => lighttpd, mode => 0640; +      ensure  => directory, +      owner   => 'lighttpd', +      group   => 'lighttpd', +      mode    => '0640';    }  } diff --git a/manifests/config/file.pp b/manifests/config/file.pp index ca1abdd..8e361f7 100644 --- a/manifests/config/file.pp +++ b/manifests/config/file.pp @@ -13,11 +13,15 @@ define lighttpd::config::file(      mode    => '0644';    } -  file_line{$name: -    ensure  => $ensure, -    path    => "${lighttpd::conf_dir}/config.conf", -    line    => "include \"${lighttpd::conf_dir_name}/${name}.conf\"", -    notify  => Service['lighttpd'], +  case $operatingsystem { +    centos,redhat,fedora: { +      file_line{$name: +        ensure  => $ensure, +        path    => "${lighttpd::conf_dir}/config.conf", +        line    => "include \"${lighttpd::conf_dir_name}/${name}.conf\"", +        notify  => Service['lighttpd'], +      } +    }    }    case $content {  | 
