nameservers now as string with ":" as delimiter
authorandreas <andreas@immerda.ch>
Mon, 28 Apr 2008 10:19:54 +0000 (10:19 +0000)
committerandreas <andreas@immerda.ch>
Mon, 28 Apr 2008 10:19:54 +0000 (10:19 +0000)
manifests/init.pp
templates/resolvconf.erb

index 58dc83f..31b41e0 100644 (file)
@@ -13,18 +13,23 @@ class resolvconf {
         ''  => 'glei.ch',
         default => $resolvconf_search,
     }
-    $real_resolvconf_nameserver1 = $resolvconf_nameserver1 ? {
-        ''  => '212.103.67.60',
+    $real_resolvconf_nameservers ? $resolvconf_nameservers ? {
+        ''  => '212.103.67.60:212.103.67.61:212.103.72.231:192.168.1.104',
         default => $resolvconf_nameserver1,
     }
-    $real_resolvconf_nameserver2 = $resolvconf_nameserver2 ? {
-        ''  => '212.103.72.231',
-        default => $resolvconf_nameserver2,
-    }
-    $real_resolvconf_nameserver3 = $resolvconf_nameserver3 ? {
-        ''  => '192.168.1.104',
-        default => $resolvconf_nameserver3,
-    }
+
+#    $real_resolvconf_nameserver1 = $resolvconf_nameserver1 ? {
+#        ''  => '212.103.67.60',
+#        default => $resolvconf_nameserver1,
+#    }
+#    $real_resolvconf_nameserver2 = $resolvconf_nameserver2 ? {
+#        ''  => '212.103.72.231',
+#        default => $resolvconf_nameserver2,
+#    }
+#    $real_resolvconf_nameserver3 = $resolvconf_nameserver3 ? {
+#        ''  => '192.168.1.104',
+#        default => $resolvconf_nameserver3,
+#    }
 
     file { '/etc/resolv.conf':
         path => '/etc/resolv.conf',
index 5ab3888..c961fc6 100644 (file)
@@ -2,7 +2,9 @@
 
 domain <%= real_resolvconf_domain %>
 search <%= real_resolvconf_search %>
-nameserver <%= real_resolvconf_nameserver1 %>
-nameserver <%= real_resolvconf_nameserver2 %>
-nameserver <%= real_resolvconf_nameserver3 %>
+
+<% real_resolvconf_nameservers.split(':').each do |val| -%> 
+nameserver <%= val %> 
+<% end -%>
+