aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/virtual
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/subsystem/virtual')
-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":