summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorMarcel Haerry <haerry@puzzle.ch>2010-09-21 18:20:00 +0200
committerMarcel Haerry <haerry@puzzle.ch>2010-09-21 18:20:00 +0200
commitb79bc742f6d93afcc2510a7f6d17175f35d907fd (patch)
tree9a8e78ba59e93dbd4ee124e6dd3e8052aa5b6735 /manifests
parentc04dbbf3b916ca0f4271d4c6cb06f37cb3e5959c (diff)
downloadpuppet-resolvconf-b79bc742f6d93afcc2510a7f6d17175f35d907fd.tar.gz
puppet-resolvconf-b79bc742f6d93afcc2510a7f6d17175f35d907fd.tar.bz2
refactor module to the new standard
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp42
1 files changed, 21 insertions, 21 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 94d2a51..68c3eb5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -13,28 +13,28 @@
#
class resolvconf {
- case $operatingsystem {
- openbsd: {
- info('$resolvconf_domain and $resolvconf_search not needed on openbsd')
- }
- default: {
- if ! $resolvconf_domain {
- fail("you need to define \$resolvconf_domain for ${fqdn}")
- }
- if ! $resolvconf_search {
- fail("you need to define \$resolvconf_search for $fqdn")
- }
- }
+ case $operatingsystem {
+ openbsd: {
+ info('$resolvconf_domain and $resolvconf_search not needed on openbsd')
}
- if ! $resolvconf_nameservers {
- fail("you need to define \$resolvconf_nameservers for $fqdn")
+ default: {
+ if ! $resolvconf_domain {
+ fail("you need to define \$resolvconf_domain for ${fqdn}")
+ }
+ if ! $resolvconf_search {
+ fail("you need to define \$resolvconf_search for $fqdn")
+ }
}
- file{'/etc/resolv.conf':
- path => '/etc/resolv.conf',
- owner => root, group => 0, mode => 0444,
- content => $operatingsystem ? {
- openbsd => template("resolvconf/resolvconf.$operatingsystem.erb"),
- default => template('resolvconf/resolvconf.erb'),
- }
+ }
+ if ! $resolvconf_nameservers {
+ fail("you need to define \$resolvconf_nameservers for $fqdn")
+ }
+ file{'/etc/resolv.conf':
+ path => '/etc/resolv.conf',
+ owner => root, group => 0, mode => 0444,
+ content => $operatingsystem ? {
+ openbsd => template("resolvconf/resolvconf.$operatingsystem.erb"),
+ default => template('resolvconf/resolvconf.erb'),
}
+ }
}