diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-04-13 15:51:35 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-04-13 15:51:35 -0300 |
commit | 47ab1cae85519b47fd6bf98e796add62e87dcec8 (patch) | |
tree | 8590ec00db2d83012ec424e117ad32ba08494cba | |
parent | 616a76609b9e03223328d3dfb66c2334bade9464 (diff) | |
download | puppet-nodo-47ab1cae85519b47fd6bf98e796add62e87dcec8.tar.gz puppet-nodo-47ab1cae85519b47fd6bf98e796add62e87dcec8.tar.bz2 |
Make nodo class include the role class
-rw-r--r-- | manifests/host.pp | 2 | ||||
-rw-r--r-- | manifests/nodo.pp | 10 | ||||
-rw-r--r-- | manifests/plug.pp | 2 | ||||
-rw-r--r-- | manifests/role/dns.pp | 4 | ||||
-rw-r--r-- | manifests/vserver.pp | 2 |
5 files changed, 16 insertions, 4 deletions
diff --git a/manifests/host.pp b/manifests/host.pp index eb907bb..ee87e2f 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -1,5 +1,5 @@ # Fully capable node able to host other nodes -class nodo::host inherits nodo { +class nodo::host { include nodo::subsystem::initramfs include nodo::subsystem::modprobe include nodo::subsystem::firewire diff --git a/manifests/nodo.pp b/manifests/nodo.pp index 27d97fa..b70bc65 100644 --- a/manifests/nodo.pp +++ b/manifests/nodo.pp @@ -1,4 +1,7 @@ -class nodo { +class nodo( + $role, + $location = 'default' +) { include lsb include nodo::subsystem::sudo include nodo::subsystem::motd @@ -149,4 +152,9 @@ class nodo { mode => 0755, ensure => present, } + + # Include role class + if defined("nodo::role::$role") { + class { "nodo::role::$role": } + } } diff --git a/manifests/plug.pp b/manifests/plug.pp index f9e787b..858ba0a 100644 --- a/manifests/plug.pp +++ b/manifests/plug.pp @@ -1,4 +1,4 @@ -class nodo::plug inherits nodo { +class nodo::plug { include syslog-ng include nodo::utils::plug include nodo::utils::physical diff --git a/manifests/role/dns.pp b/manifests/role/dns.pp index 2faa69b..a439092 100644 --- a/manifests/role/dns.pp +++ b/manifests/role/dns.pp @@ -1,3 +1,7 @@ class nodo::role::dns inherits nodo::vserver { include bind + + if defined('dns') { + class { 'dns': } + } } diff --git a/manifests/vserver.pp b/manifests/vserver.pp index fa08147..030803f 100644 --- a/manifests/vserver.pp +++ b/manifests/vserver.pp @@ -1,4 +1,4 @@ -class nodo::vserver inherits nodo { +class nodo::vserver { class { 'timezone': } class { 'syslog-ng::vserver': } |