aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp55
-rw-r--r--manifests/nodo.pp9
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}": }
- }
-}