summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-10-16 17:30:07 +0200
committermh <mh@immerda.ch>2010-10-16 17:30:07 +0200
commit6138c73f0cbaddc0049f217f3f84cf4dcc3d2029 (patch)
treefeec4bb88dc5c3f8362ac49228bd5bbcbed8c8ca /manifests
parent82115f575af62011d85f19d3b4c2ca077b185c67 (diff)
downloadpuppet-lighttpd-6138c73f0cbaddc0049f217f3f84cf4dcc3d2029.tar.gz
puppet-lighttpd-6138c73f0cbaddc0049f217f3f84cf4dcc3d2029.tar.bz2
debinize config
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base.pp1
-rw-r--r--manifests/config/file.pp11
-rw-r--r--manifests/debian.pp8
-rw-r--r--manifests/init.pp1
4 files changed, 18 insertions, 3 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 84062eb..41af569 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -13,6 +13,7 @@ class lighttpd::base {
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'],
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,
}
}
diff --git a/manifests/debian.pp b/manifests/debian.pp
new file mode 100644
index 0000000..0b67924
--- /dev/null
+++ b/manifests/debian.pp
@@ -0,0 +1,8 @@
+class lighttpd::debian inherits lighttpd::base {
+ file{
+ '/var/www/lighttpd':
+ ensure => directory;
+ '/var/www/index.lighttpd.html':
+ ensure => absent,
+ }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index 11078aa..9772817 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -4,6 +4,7 @@
class lighttpd {
case $operatingsystem {
+ debian,ubuntu: { include lighttpd::debian }
default: { include lighttpd::base }
}