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/subsystem/virtual/instance.pp | 62 +-------------------------------- 1 file changed, 1 insertion(+), 61 deletions(-) (limited to 'manifests/subsystem/virtual') diff --git a/manifests/subsystem/virtual/instance.pp b/manifests/subsystem/virtual/instance.pp index 151058e..a7fead0 100644 --- a/manifests/subsystem/virtual/instance.pp +++ b/manifests/subsystem/virtual/instance.pp @@ -1,7 +1,6 @@ # Define a virtual server instance define nodo::subsystem::virtual::instance( $context, - $distro = 'jessie', $ensure = 'running', $proxy = false, $puppetmaster = false, @@ -47,66 +46,7 @@ define nodo::subsystem::virtual::instance( $dev = hiera('nodo::subsystem::vm::interface', 'eth0') - if $implementation == 'vserver' { - virtual::vserver { $name: - ensure => $ensure, - context => "$context", - mark => 'default', - distro => $distro, - interface => "${dev}:192.168.0.${context}/24", - hostname => "$name.$domain", - memory_limit => $memory_limit, - } - - # Some nodes need a lot of space at /tmp otherwise some admin - # tasks like backups might not run. - file { "/etc/vservers/${name}/fstab": - source => [ "puppet:///modules/site_nodo/etc/fstab/vserver/$name", - "puppet:///modules/nodo/etc/fstab/vserver" ], - owner => "root", - group => "root", - mode => 0644, - ensure => present, - notify => Exec["vs_restart_${name}"], - require => Exec["vserver_instance_${name}"], - } - - # Sound support - if $sound { - if !defined(File["/usr/local/sbin/create-sound-devices"]) { - file { "/usr/local/sbin/create-sound-devices": - ensure => present, - source => "puppet:///modules/nodo/sound/devices.sh", - owner => root, - group => root, - mode => 755, - } - } - exec { "/usr/local/sbin/create-sound-devices ${name}": - unless => "/usr/local/sbin/create-sound-devices ${name} --check", - user => root, - require => [ Exec["vs_create_${name}"], File["/usr/local/sbin/create-sound-devices"] ], - } - } - } - - # Create a munin virtual resource to be realized in the node - @@nodo::subsystem::monitor::munin { "${name}": - port => $munin_port ? { - false => "49$id", - default => $munin_port, - } - } - - # Create a monkeysphere virtual resource to be realized in the node - @@nodo::subsystem::monkeysphere { "$name": - port => $monkeysphere_ssh_port ? { - false => "22$id", - default => $monkeysphere_ssh_port, - } - } - - # Apply firewall rules just for running vservers + # Apply firewall rules just for running virtual machines case $ensure { 'running': { firewall::virtual::ssh { "$name": -- cgit v1.2.3