diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2011-09-13 13:37:11 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2011-09-13 13:37:11 -0300 | 
| commit | b4221a547d5b7739bd9c76a1c6f75a4536490e2d (patch) | |
| tree | 7a57137935325f8920af4586ebf7784b80ad7a70 | |
| parent | 066aed3b86377004786972b6dccfbc631011a6f2 (diff) | |
| download | puppet-nodo-b4221a547d5b7739bd9c76a1c6f75a4536490e2d.tar.gz puppet-nodo-b4221a547d5b7739bd9c76a1c6f75a4536490e2d.tar.bz2 | |
Adding resolver class
| -rw-r--r-- | manifests/init.pp | 1 | ||||
| -rw-r--r-- | manifests/physical.pp | 6 | ||||
| -rw-r--r-- | manifests/plug.pp | 6 | ||||
| -rw-r--r-- | manifests/subsystems/resolver.pp | 11 | 
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 +    } +  } +} | 
