diff options
author | mh <mh@immerda.ch> | 2010-10-16 17:30:07 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-10-16 17:30:07 +0200 |
commit | 6138c73f0cbaddc0049f217f3f84cf4dcc3d2029 (patch) | |
tree | feec4bb88dc5c3f8362ac49228bd5bbcbed8c8ca /manifests/config | |
parent | 82115f575af62011d85f19d3b4c2ca077b185c67 (diff) | |
download | puppet-lighttpd-6138c73f0cbaddc0049f217f3f84cf4dcc3d2029.tar.gz puppet-lighttpd-6138c73f0cbaddc0049f217f3f84cf4dcc3d2029.tar.bz2 |
debinize config
Diffstat (limited to 'manifests/config')
-rw-r--r-- | manifests/config/file.pp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/manifests/config/file.pp b/manifests/config/file.pp index 8993693..7d44780 100644 --- a/manifests/config/file.pp +++ b/manifests/config/file.pp @@ -3,7 +3,12 @@ define lighttpd::config::file( $conf_source = 'absent', $content = 'absent' ){ - file{"/etc/lighttpd/conf.d/${name}.conf": + $conf_dir = $operatingsystem ? { + debian => '/etc/lighttpd/conf-available', + ubuntu => '/etc/lighttpd/conf-available', + default => '/etc/lighttpd/conf.d' + } + file{"${conf_dir}/${name}.conf": ensure => $ensure, notify => Service['lighttpd'], owner => root, group => 0, mode => 0644; @@ -11,7 +16,7 @@ define lighttpd::config::file( case $content { 'absent': { - File["/etc/lighttpd/conf.d/${name}.conf"]{ + File["${conf_dir}/${name}.conf"]{ source => $conf_source ? { 'absent' => [ "puppet:///modules/site-lighttpd/conf.d/$fqdn/$name.conf", @@ -29,7 +34,7 @@ define lighttpd::config::file( } } default: { - File["/etc/lighttpd/conf.d/${name}.conf"]{ + File["${conf_dir}/${name}.conf"]{ content => $content, } } |