From a9c544369f3999b868cfc1eb0dcb10e050defcc1 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 8 Feb 2016 03:36:43 -0200 Subject: Initial cleanup Remove munin, fstab, crypttab, gdm and old subsystems. This major change is motivated by the fact that the configuration has grown too much along the years and is difficult to maintain. Simplification is then necessary to keep going. --- manifests/base/appliance.pp | 4 ---- manifests/base/desktop.pp | 13 ----------- manifests/base/host.pp | 24 -------------------- manifests/base/laptop.pp | 19 ---------------- manifests/base/personal.pp | 13 +---------- manifests/base/physical.pp | 55 ++------------------------------------------- manifests/base/plug.pp | 10 --------- manifests/base/removable.pp | 7 ------ manifests/base/virtual.pp | 23 +++---------------- 9 files changed, 6 insertions(+), 162 deletions(-) (limited to 'manifests/base') diff --git a/manifests/base/appliance.pp b/manifests/base/appliance.pp index 3032479..982e589 100644 --- a/manifests/base/appliance.pp +++ b/manifests/base/appliance.pp @@ -1,7 +1,3 @@ class nodo::base::appliance inherits nodo::base::physical { class { 'nodo::subsystem::sysctl::appliance': } - - class { [ 'nodo::subsystem::fstab', 'nodo::subsystem::crypttab' ]: - type => 'appliance', - } } diff --git a/manifests/base/desktop.pp b/manifests/base/desktop.pp index 7dd969c..8b03e6e 100644 --- a/manifests/base/desktop.pp +++ b/manifests/base/desktop.pp @@ -1,16 +1,3 @@ class nodo::base::desktop inherits nodo::base::personal { include nodo::utils::desktop - - class { [ 'nodo::subsystem::fstab', 'nodo::subsystem::crypttab' ]: - type => 'desktop', - } - - # Allow regular users to power off the machine (overrides policy kit default configuration) - file { '/usr/share/polkit-1/actions/org.freedesktop.consolekit.policy': - ensure => present, - owner => root, - group => root, - mode => 0644, - source => 'puppet:///modules/nodo/polkit/org.freedesktop.consolekit.policy', - } } diff --git a/manifests/base/host.pp b/manifests/base/host.pp index 8cbf9d2..80eb936 100644 --- a/manifests/base/host.pp +++ b/manifests/base/host.pp @@ -14,17 +14,6 @@ class nodo::base::host { # Firewall class { 'firewall': } - # Vserver - if $::lsbdistcodename == 'squeeze' { - $vserver = hiera('nodo::host::use_vserver', True) - - if $vserver == true { - class { 'virtual::vserver::host': - vdirbase => "/var/vservers", - } - } - } - # Time $ntpdate = hiera('nodo::host::ntpdate', True) case $ntpdate { @@ -40,17 +29,4 @@ class nodo::base::host { #dombr => $::is_virtual, #dobios => $::is_virtual, } - - # Monitoring - if !defined(Class['nodo::subsystem::monitor']) { - class { 'nodo::subsystem::monitor': } - } - - # Munin configuration - $munin = hiera('nodo::host::use_munin', True) - if $munin == true { - nodo::subsystem::monitor::munin { "$hostname": - port => '4900', - } - } } diff --git a/manifests/base/laptop.pp b/manifests/base/laptop.pp index 3885606..b984873 100644 --- a/manifests/base/laptop.pp +++ b/manifests/base/laptop.pp @@ -54,23 +54,4 @@ class nodo::base::laptop inherits nodo::base::personal { default => present, }, } - - # Avoid this annoying warning - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673818 - file { '/etc/laptop-mode/conf.d/board-specific': - ensure => directory, - owner => root, - group => root, - mode => 0755, - require => Package['laptop-mode-tools'], - } - - file { '/etc/laptop-mode/conf.d/board-specific/bogus.conf' : - ensure => present, - owner => 'root', - group => 'root', - mode => '0644', - content => "# Placeholder file, see Debian bug #673818\n", - require => File['/etc/laptop-mode/conf.d/board-specific'], - } } diff --git a/manifests/base/personal.pp b/manifests/base/personal.pp index 14fa34f..55f4835 100644 --- a/manifests/base/personal.pp +++ b/manifests/base/personal.pp @@ -4,19 +4,8 @@ class nodo::base::personal { include nodo::utils::personal include autossh - class { 'nodo::subsystem::pam': } class { 'nodo::subsystem::xorg': } - - if $::lsbdistcodename == 'squeeze' { - include nodo::subsystem::gdm - } - elsif $::lsbdistcodename == 'wheezy' { - include nodo::subsystem::gdm3 - } - else { - include nodo::subsystem::gdm3::disabled - include nodo::subsystem::lightdm - } + class { 'nodo::subsystem::lightdm': } # Media folders and groups include nodo::subsystem::media diff --git a/manifests/base/physical.pp b/manifests/base/physical.pp index 45648ee..a00dd18 100644 --- a/manifests/base/physical.pp +++ b/manifests/base/physical.pp @@ -1,58 +1,7 @@ class nodo::base::physical inherits nodo::base::host { class { [ 'nodo::subsystem::ups', 'smartmontools' ]: } - # SMART and sensors monitoring - $munin = hiera('nodo::host::use_munin', True) - if $munin == true { - include munin::plugins::smart - - # TODO: use nodo::physical::disks instead - $sdb = hiera('nodo::physical::sdb', false) - $disks = $sdb ? { - true => 'sda sdb', - default => 'sda', - } - - munin::plugin { 'hddtemp_smartctl': - ensure => present, - config => "user root\ngroup disk\nenv.drives ${disks}", - } - - munin::plugin { 'smart_sda': - ensure => 'smart_', - config => "user root\ngroup disk", - } - - if $sdb == true { - munin::plugin { 'smart_sdb': - ensure => 'smart_', - config => "user root\ngroup disk", - } - } - - package { 'lm-sensors': - ensure => present, - } - - munin::plugin { [ 'sensors_fan', 'sensors_volt', 'sensors_temp' ]: - ensure => 'sensors_', - } - } - - # Entropy key - $ekey_masterkey = hiera('nodo::physical::ekey_masterkey', '') - if $ekey_masterkey != '' { - class { "ekeyd": - ekeyd_masterkey => $ekey_masterkey, - } - - # We can also use ekeyd::munin - munin::plugin { [ 'ekeyd_stat_KeyTemperatureC', 'ekeyd_stat_KeyTemperatureF', - 'ekeyd_stat_KeyTemperatureK', 'ekeyd_stat_TotalEntropy', - 'ekeyd_stat_KeyVoltage', 'ekeyd_stat_FipsFrameRate', - 'ekeyd_stat_EntropyRate', 'ekeyd_stat' ]: - ensure => 'ekeyd_stat_', - config => 'user root', - } + package { 'lm-sensors': + ensure => present, } } diff --git a/manifests/base/plug.pp b/manifests/base/plug.pp index 49d9f8d..756eb3c 100644 --- a/manifests/base/plug.pp +++ b/manifests/base/plug.pp @@ -13,14 +13,4 @@ class nodo::base::plug { backupninja::sys { "sys": ensure => present, } - - # Monitoring - if !defined(Class['nodo::subsystem::monitor']) { - class { 'nodo::subsystem::monitor': } - } - - # Munin configuration - nodo::subsystem::monitor::munin { "${::hostname}": - port => '4900', - } } diff --git a/manifests/base/removable.pp b/manifests/base/removable.pp index d13b5ee..e82700c 100644 --- a/manifests/base/removable.pp +++ b/manifests/base/removable.pp @@ -1,9 +1,2 @@ class nodo::base::removable inherits nodo::base::desktop { - File["/etc/fstab"] { - source => "puppet:///modules/nodo/etc/fstab/removable", - } - - File["/etc/crypttab"] { - source => "puppet:///modules/nodo/etc/crypttab/removable", - } } diff --git a/manifests/base/virtual.pp b/manifests/base/virtual.pp index f2c72f1..5e86e42 100644 --- a/manifests/base/virtual.pp +++ b/manifests/base/virtual.pp @@ -10,25 +10,8 @@ class nodo::base::virtual { dohwinfo => false, } - $hosting_type = hiera('nodo::vserver::hosting_type', 'direct') - - case $hosting_type { - "direct": { - # Apply munin and monkeysphere configuration for - # for directly hosted nodes. - Nodo::Subsystem::Monitor::Munin <<| title == $::hostname |>> - Nodo::Subsystem::Monkeysphere <<| title == $::hostname |>> - } - "third-party": { - # Apply munin and monkeysphere configuration for - # nodes hosted by third-parties. - nodo::subsystem::monitor::munin { "${::hostname}": } - monkeysphere_host { "${::hostname}": - port => hiera('nodo::vserver::ssh_port', '22'), - } - - # Nagios configuration - class { 'nodo::subsystem::monitor': } - } + nodo::subsystem::monitor::munin { "${::hostname}": } + monkeysphere_host { "${::hostname}": + port => hiera('nodo::vserver::ssh_port', '22'), } } -- cgit v1.2.3