diff options
Diffstat (limited to 'manifests/subsystem/virtual/instance.pp')
-rw-r--r-- | manifests/subsystem/virtual/instance.pp | 74 |
1 files changed, 24 insertions, 50 deletions
diff --git a/manifests/subsystem/virtual/instance.pp b/manifests/subsystem/virtual/instance.pp index dddebea..d304001 100644 --- a/manifests/subsystem/virtual/instance.pp +++ b/manifests/subsystem/virtual/instance.pp @@ -1,25 +1,25 @@ # Define a virtual server instance define nodo::subsystem::virtual::instance( - $context, - $ensure = 'running', - $proxy = false, - $puppetmaster = false, - $web = false, - $gitd = false, - $mail = false, - $icecast = false, - $sound = false, - $tor = false, - $ticket = false, - $memory_limit = false, - $dns = false, - $jabber = false, - $mumble = false, - $gobby = false, - $yacy = false, - $rsync = false, - $avahi = false, - $implementation = false + $vg, + $context, + $ram = '1G', + $size = '10G', + $ensure = 'running', + $proxy = false, + $web = false, + $gitd = false, + $mail = false, + $icecast = false, + $tor = false, + $ticket = false, + $dns = false, + $jabber = false, + $mumble = false, + $gobby = false, + $yacy = false, + $rsync = false, + $avahi = false, + $subnet = '10.1.1', ) { # Instance id if $context <= 9 { @@ -28,29 +28,12 @@ define nodo::subsystem::virtual::instance( $id = $context } - # Puppetmaster ssl port - case $puppetmaster_port { - '': { $puppetmaster_port = "8140" } + virtual::kvm::manager::instance { $name: + vg => $vg, + size => $size, + ram => $ram, } - # Set puppetmaster non-ssl port - case $puppetmaster_nonssl_port { - '': { $puppetmaster_nonssl_port = "8141" } - } - - # Tor port - case $tor_port { - '': { $tor_port = "9001" } - } - - # Subnet - case $implementation { - 'vserver': { $subnet = "192.168.0" } - default: { $subnet = "10.1.1" } - } - - $dev = hiera('nodo::subsystem::vm::interface', 'eth0') - # Apply firewall rules just for running virtual machines case $ensure { 'running': { @@ -67,15 +50,6 @@ define nodo::subsystem::virtual::instance( } } - if $puppetmaster { - class { - "firewall::virtual::puppetmaster": - destination => "${subnet}.$context", - puppetmaster_port => $puppetmaster_port, - puppetmaster_nonssl_port => $puppetmaster_nonssl_port, - } - } - if $web { firewall::virtual::web { $name: destination => "${subnet}.$context", |