diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/base.pp | 13 | ||||
-rw-r--r-- | manifests/base/host.pp | 2 | ||||
-rw-r--r-- | manifests/base/personal.pp | 6 | ||||
-rw-r--r-- | manifests/init.pp | 41 | ||||
-rw-r--r-- | manifests/nodo.pp | 9 | ||||
-rw-r--r-- | manifests/subsystem/apt.pp | 3 | ||||
-rw-r--r-- | manifests/subsystem/gdm3/disabled.pp | 13 | ||||
-rw-r--r-- | manifests/subsystem/lightdm.pp | 10 | ||||
-rw-r--r-- | manifests/subsystem/lightdm/disabled.pp | 9 | ||||
-rw-r--r-- | manifests/subsystem/monitor/master.pp | 7 | ||||
-rw-r--r-- | manifests/utils/development/reverse.pp | 5 | ||||
-rw-r--r-- | manifests/vserver/instance.pp | 2 |
12 files changed, 83 insertions, 37 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/base/personal.pp b/manifests/base/personal.pp index 4f18d85..14fa34f 100644 --- a/manifests/base/personal.pp +++ b/manifests/base/personal.pp @@ -10,9 +10,13 @@ class nodo::base::personal { if $::lsbdistcodename == 'squeeze' { include nodo::subsystem::gdm } - else { + elsif $::lsbdistcodename == 'wheezy' { include nodo::subsystem::gdm3 } + else { + include nodo::subsystem::gdm3::disabled + 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/gdm3/disabled.pp b/manifests/subsystem/gdm3/disabled.pp new file mode 100644 index 0000000..117c530 --- /dev/null +++ b/manifests/subsystem/gdm3/disabled.pp @@ -0,0 +1,13 @@ +class nodo::subsystem::gdm3::disabled { + Package['gdm3'] { + ensure => absent, + } + + Service['gdm3'] { + ensure => stopped, + } + + File['/etc/gdm3/greeter.gsettings'] { + ensure => absent, + } +} diff --git a/manifests/subsystem/lightdm.pp b/manifests/subsystem/lightdm.pp new file mode 100644 index 0000000..ba10159 --- /dev/null +++ b/manifests/subsystem/lightdm.pp @@ -0,0 +1,10 @@ +class nodo::subsystem::lightdm { + package { 'lightdm': + ensure => present, + } + + service { 'lightdm': + ensure => running, + require => Package['lightdm'], + } +} diff --git a/manifests/subsystem/lightdm/disabled.pp b/manifests/subsystem/lightdm/disabled.pp new file mode 100644 index 0000000..4b9e4d2 --- /dev/null +++ b/manifests/subsystem/lightdm/disabled.pp @@ -0,0 +1,9 @@ +class nodo::subsystem::lightdm::disabled { + Package['lightdm'] { + ensure => absent, + } + + Service['lightdm'] { + ensure => stopped, + } +} 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', |