aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp1
-rw-r--r--manifests/physical.pp6
-rw-r--r--manifests/plug.pp6
-rw-r--r--manifests/subsystems/resolver.pp11
4 files changed, 14 insertions, 10 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index a196052..ba00db9 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -66,6 +66,7 @@ import "subsystems/tunnel.pp"
import "subsystems/monkeysphere.pp"
import "subsystems/profile.pp"
import "subsystems/schroot.pp"
+import "subsystems/resolver.pp"
import "subsystems/utils.pp"
import "subsystems/utils/debian.pp"
import "subsystems/utils/desktop.pp"
diff --git a/manifests/physical.pp b/manifests/physical.pp
index 657c7d2..97e55d3 100644
--- a/manifests/physical.pp
+++ b/manifests/physical.pp
@@ -8,6 +8,7 @@ class nodo::physical inherits nodo {
include ups
include utils::physical
include smartmontools
+ include resolver
# Vserver configuration
$vserver_vdirbase = "/var/vservers"
@@ -24,11 +25,6 @@ class nodo::physical inherits nodo {
default: { include ntpdate }
}
- # DNS resolver
- $resolvconf_domain = "$domain"
- $resolvconf_search = "$fqdn"
- include resolvconf
-
# SSH Server
#
# We need to restrict listen address so multiple instances
diff --git a/manifests/plug.pp b/manifests/plug.pp
index e7f53de..4c5d859 100644
--- a/manifests/plug.pp
+++ b/manifests/plug.pp
@@ -5,6 +5,7 @@ class nodo::plug inherits nodo {
include utils::plug
include firewall
include sysctl
+ include resolver
backupninja::sys { "sys":
ensure => present,
@@ -18,11 +19,6 @@ class nodo::plug inherits nodo {
}
}
- # DNS resolver
- $resolvconf_domain = "$domain"
- $resolvconf_search = "$fqdn"
- include resolvconf
-
# Munin configuration
munin_node { "$hostname":
port => '4900',
diff --git a/manifests/subsystems/resolver.pp b/manifests/subsystems/resolver.pp
new file mode 100644
index 0000000..e1e4582
--- /dev/null
+++ b/manifests/subsystems/resolver.pp
@@ -0,0 +1,11 @@
+class resolver {
+ # DNS resolver
+ case $resolvconf_nameservers {
+ '': { }
+ default: {
+ $resolvconf_domain = "$domain"
+ $resolvconf_search = "$fqdn"
+ include resolvconf
+ }
+ }
+}