From b4221a547d5b7739bd9c76a1c6f75a4536490e2d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 13 Sep 2011 13:37:11 -0300 Subject: Adding resolver class --- manifests/init.pp | 1 + manifests/physical.pp | 6 +----- manifests/plug.pp | 6 +----- manifests/subsystems/resolver.pp | 11 +++++++++++ 4 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 manifests/subsystems/resolver.pp (limited to 'manifests') 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 + } + } +} -- cgit v1.2.3