diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2013-04-13 16:21:15 -0300 | 
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2013-04-13 16:21:15 -0300 | 
| commit | e55f3c60b30042a72d722f21b0c6133faaa78a43 (patch) | |
| tree | 6d584c20735fd8f6a096b319d8ed5aa968dd7a5a /manifests | |
| parent | 47ab1cae85519b47fd6bf98e796add62e87dcec8 (diff) | |
| download | puppet-nodo-e55f3c60b30042a72d722f21b0c6133faaa78a43.tar.gz puppet-nodo-e55f3c60b30042a72d722f21b0c6133faaa78a43.tar.bz2  | |
Get role and location variables via hiera
Diffstat (limited to 'manifests')
| -rw-r--r-- | manifests/init.pp | 5 | ||||
| -rw-r--r-- | manifests/nodo.pp | 5 | 
2 files changed, 6 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index df1c239..d8155b6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,6 +9,11 @@ Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }  filebucket { server: server => hiera('puppet::daemon::server', "puppet.${::domain}") }  File { backup => server } +# Set role and location variables: this is a trick so we can use role and location +# in Hiera's hierarchical config. +$role     = hiera('nodo::role', 'default') +$location = hiera('nodo::role', 'default') +  # Import required modules  import "common"  import "sshd" diff --git a/manifests/nodo.pp b/manifests/nodo.pp index b70bc65..bd3f2a4 100644 --- a/manifests/nodo.pp +++ b/manifests/nodo.pp @@ -1,7 +1,4 @@ -class nodo( -  $role, -  $location = 'default' -) { +class nodo {    include lsb    include nodo::subsystem::sudo    include nodo::subsystem::motd  | 
