summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSimon Josi <josi@puzzle.ch>2010-02-24 11:32:04 +0100
committerMarcel Haerry <haerry@puzzle.ch>2010-09-21 18:19:33 +0200
commitc04dbbf3b916ca0f4271d4c6cb06f37cb3e5959c (patch)
treeefd112e42f1e893d16db3abc29d6f5600ca5d402 /manifests
parent1fe903dfac67bb74c837d7e803225053275bbc22 (diff)
downloadpuppet-resolvconf-c04dbbf3b916ca0f4271d4c6cb06f37cb3e5959c.tar.gz
puppet-resolvconf-c04dbbf3b916ca0f4271d4c6cb06f37cb3e5959c.tar.bz2
cleanup
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp25
1 files changed, 12 insertions, 13 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 77c921f..94d2a51 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -14,27 +14,26 @@
class resolvconf {
case $operatingsystem {
- openbsd: { info("\$resolvconf_domain and \$resolvconf_search not needed on openbsd") }
+ openbsd: {
+ info('$resolvconf_domain and $resolvconf_search not needed on openbsd')
+ }
default: {
- case $resolvconf_domain {
- '': { fail("you need to define \$resolvconf_domain for ${fqdn}") }
+ if ! $resolvconf_domain {
+ fail("you need to define \$resolvconf_domain for ${fqdn}")
}
- case $resolvconf_search {
- '': { fail("you need to define \$resolvconf_search for ${fqdn}") }
+ if ! $resolvconf_search {
+ fail("you need to define \$resolvconf_search for $fqdn")
}
}
}
- case $resolvconf_nameservers {
- '': { fail("you need to define \$resolvconf_nameservers for ${fqdn}") }
+ if ! $resolvconf_nameservers {
+ fail("you need to define \$resolvconf_nameservers for $fqdn")
}
-
- file { '/etc/resolv.conf':
+ file{'/etc/resolv.conf':
path => '/etc/resolv.conf',
- owner => root,
- group => 0,
- mode => 444,
+ owner => root, group => 0, mode => 0444,
content => $operatingsystem ? {
- openbsd => template("resolvconf/resolvconf.${operatingsystem}.erb"),
+ openbsd => template("resolvconf/resolvconf.$operatingsystem.erb"),
default => template('resolvconf/resolvconf.erb'),
}
}