aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/virtual/instance.pp
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-02-08 03:36:43 -0200
committerSilvio Rhatto <rhatto@riseup.net>2016-02-08 03:36:43 -0200
commita9c544369f3999b868cfc1eb0dcb10e050defcc1 (patch)
tree2f06ad6d179f2677368b2ec7d0932d5aaa0ad2ea /manifests/subsystem/virtual/instance.pp
parent6097bca6f5302765007f65a52f87999dbaefcff9 (diff)
downloadpuppet-nodo-a9c544369f3999b868cfc1eb0dcb10e050defcc1.tar.gz
puppet-nodo-a9c544369f3999b868cfc1eb0dcb10e050defcc1.tar.bz2
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.
Diffstat (limited to 'manifests/subsystem/virtual/instance.pp')
-rw-r--r--manifests/subsystem/virtual/instance.pp62
1 files changed, 1 insertions, 61 deletions
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":