diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-06-29 21:40:17 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-06-29 21:40:17 -0300 |
commit | d972a01c786ce858b57feacfe904cce150a1881a (patch) | |
tree | 39d32f4722170173179fee1b5889164e8654f626 | |
parent | 3a2b922df895b204e14ab8e7cb51661e4956cbc4 (diff) | |
download | puppet-nodo-d972a01c786ce858b57feacfe904cce150a1881a.tar.gz puppet-nodo-d972a01c786ce858b57feacfe904cce150a1881a.tar.bz2 |
Initial refactor for puppet 3.x
-rw-r--r-- | manifests/init.pp | 55 | ||||
-rw-r--r-- | manifests/nodo.pp | 9 |
2 files changed, 30 insertions, 34 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 721ed93..ee11e11 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,34 +2,39 @@ # Nodo module. # -# Default execution path -Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" } +# Import required modules +#import "common" -# Fileserver backup -filebucket { server: server => hiera('puppet::daemon::server', "puppet.${::domain}") } -File { backup => server } +# Modules that still doesn't support autoloading +#import 'dhcp' +#import 'virtual' -# 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::location', 'default') +# Definitions +#import "defines/monkeysphere_host.pp" +#import "defines/munin_node.pp" +#import "defines/ssh_config.pp" +#import "defines/ssh_create_key.pp" +#import "defines/ssh_known_hosts.pp" +#import "defines/ssh_local_key.pp" +#import "defines/ssh_folder.pp" +#import "defines/sysctl.pp" -# Import required modules -import "common" +class nodo( + $role = hiera('nodo::role', 'default'), + $location = hiera('nodo::location', 'default'), +) { + # Default execution path + Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" } -# Modules that still doesn't support autoloading -import 'dhcp' -import 'virtual' + # Fileserver backup + filebucket { server: server => hiera('puppet::daemon::server', "puppet.${::domain}") } + File { backup => server } -# Nodo class -import "nodo.pp" + # Include base class + include nodo::base -# Definitions -import "defines/monkeysphere_host.pp" -import "defines/munin_node.pp" -import "defines/ssh_config.pp" -import "defines/ssh_create_key.pp" -import "defines/ssh_known_hosts.pp" -import "defines/ssh_local_key.pp" -import "defines/ssh_folder.pp" -import "defines/sysctl.pp" + # Include role class + if defined("nodo::role::${role}") { + class { "nodo::role::${role}": } + } +} diff --git a/manifests/nodo.pp b/manifests/nodo.pp deleted file mode 100644 index 50b74b8..0000000 --- a/manifests/nodo.pp +++ /dev/null @@ -1,9 +0,0 @@ -class nodo { - # Include base class - include nodo::base - - # Include role class - if defined("nodo::role::${::role}") { - class { "nodo::role::${::role}": } - } -} |