aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/etc/sources.list.d/domain.list1
-rw-r--r--manifests/base.pp13
-rw-r--r--manifests/base/host.pp2
-rw-r--r--manifests/base/personal.pp5
-rw-r--r--manifests/init.pp41
-rw-r--r--manifests/nodo.pp9
-rw-r--r--manifests/subsystem/apt.pp3
-rw-r--r--manifests/subsystem/monitor/master.pp7
-rw-r--r--manifests/utils/development/reverse.pp5
-rw-r--r--manifests/vserver/instance.pp2
10 files changed, 51 insertions, 37 deletions
diff --git a/files/etc/sources.list.d/domain.list b/files/etc/sources.list.d/domain.list
new file mode 100644
index 0000000..1a2dc25
--- /dev/null
+++ b/files/etc/sources.list.d/domain.list
@@ -0,0 +1 @@
+# Managed by puppet
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/base/personal.pp b/manifests/base/personal.pp
index 4f18d85..6a3dc4e 100644
--- a/manifests/base/personal.pp
+++ b/manifests/base/personal.pp
@@ -10,9 +10,12 @@ class nodo::base::personal {
if $::lsbdistcodename == 'squeeze' {
include nodo::subsystem::gdm
}
- else {
+ elsif $::lsbdistcodename == 'wheezy' {
include nodo::subsystem::gdm3
}
+ #else {
+ # include nodo::subsystem::lightdm
+ #}
# Media folders and groups
include nodo::subsystem::media
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/subsystem/monitor/master.pp b/manifests/subsystem/monitor/master.pp
index 1f97a36..dd6defa 100644
--- a/manifests/subsystem/monitor/master.pp
+++ b/manifests/subsystem/monitor/master.pp
@@ -13,8 +13,13 @@ class nodo::subsystem::monitor::master {
default => 'absent',
}
- # Munin configuration for apache
+ # Legacy configuration
file { '/etc/apache2/conf.d/munin':
+ ensure => absent,
+ }
+
+ # Munin configuration for apache
+ file { '/etc/apache2/conf.d/munin.conf':
ensure => present,
owner => root,
group => root,
diff --git a/manifests/utils/development/reverse.pp b/manifests/utils/development/reverse.pp
new file mode 100644
index 0000000..1770b34
--- /dev/null
+++ b/manifests/utils/development/reverse.pp
@@ -0,0 +1,5 @@
+class nodo::utils::development::reverse {
+ package { 'binwalk':
+ ensure => present,
+ }
+}
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',