aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base.pp13
-rw-r--r--manifests/base/host.pp2
-rw-r--r--manifests/init.pp41
-rw-r--r--manifests/nodo.pp9
-rw-r--r--manifests/subsystem/apt.pp3
-rw-r--r--manifests/vserver/instance.pp2
6 files changed, 35 insertions, 35 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index b8a16e9..df3dd31 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,5 +1,5 @@
class nodo::base(
- $puppet_standalone = hiera('nodo::base::puppet_standalone', false)
+ $puppet_mode = hiera('nodo::base::puppet_mode', 'daemon')
){
# First include the LSB class
include lsb
@@ -30,16 +30,19 @@ class nodo::base(
include cron
# Require admin accounts' class
- require users::admin
+ if (defined(site_users::admin)) {
+ include site_users::admin
+ }
# Puppet
- case $puppet_standalone {
- true: { include puppet::standalone }
- false: {
+ case $puppet_mode {
+ 'standalone': { include puppet::standalone }
+ 'daemon': {
class { 'puppet::daemon':
master => hiera('nodo::role::master::main', false),
}
}
+ default: { }
}
# Does not work well inside vservers
diff --git a/manifests/base/host.pp b/manifests/base/host.pp
index 07c2d5b..799fe20 100644
--- a/manifests/base/host.pp
+++ b/manifests/base/host.pp
@@ -19,7 +19,7 @@ class nodo::base::host {
$vserver = hiera('nodo::host::use_vserver', True)
if $vserver == true {
- class { 'vserver::host':
+ class { 'virtual::vserver::host':
vdirbase => "/var/vservers",
}
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 721ed93..1671940 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -2,27 +2,12 @@
# Nodo module.
#
-# Default execution path
-Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }
-
-# Fileserver backup
-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::location', 'default')
-
# Import required modules
-import "common"
+#import "common"
# Modules that still doesn't support autoloading
-import 'dhcp'
-import 'virtual'
-
-# Nodo class
-import "nodo.pp"
+#import 'dhcp'
+#import 'virtual'
# Definitions
import "defines/monkeysphere_host.pp"
@@ -33,3 +18,23 @@ import "defines/ssh_known_hosts.pp"
import "defines/ssh_local_key.pp"
import "defines/ssh_folder.pp"
import "defines/sysctl.pp"
+
+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" }
+
+ # Fileserver backup
+ filebucket { server: server => hiera('puppet::daemon::server', "puppet.${::domain}") }
+ File { backup => server }
+
+ # Include base class
+ include nodo::base
+
+ # 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}": }
- }
-}
diff --git a/manifests/subsystem/apt.pp b/manifests/subsystem/apt.pp
index 038b503..c927062 100644
--- a/manifests/subsystem/apt.pp
+++ b/manifests/subsystem/apt.pp
@@ -14,7 +14,8 @@ class nodo::subsystem::apt {
::apt::sources_list { "${::domain}.list":
source => [ "puppet:///modules/site_apt/sources.list.d/${::operatingsystem}/${::lsbdistcodename}/${::domain}.list",
- "puppet:///modules/site_apt/sources.list.d/${::operatingsystem}/${::domain}.list", ],
+ "puppet:///modules/site_apt/sources.list.d/${::operatingsystem}/${::domain}.list",
+ "puppet:///modules/nodo/etc/sources.list.d/domain.list", ],
ensure => $apt_domain_source ? {
true => present,
default => absent,
diff --git a/manifests/vserver/instance.pp b/manifests/vserver/instance.pp
index 6db61e4..2003861 100644
--- a/manifests/vserver/instance.pp
+++ b/manifests/vserver/instance.pp
@@ -47,7 +47,7 @@ define nodo::vserver::instance(
$dev = hiera('nodo::vserver::interface', 'eth0')
- vserver { $name:
+ virtual::vserver { $name:
ensure => $ensure,
context => "$context",
mark => 'default',