From 2b1ad5dbb7d8db09709a9e50e43a295a5428bd43 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 14 Jun 2018 01:41:43 -0300 Subject: KVMX enhancements --- manifests/subsystem/virtual/instance.pp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/manifests/subsystem/virtual/instance.pp b/manifests/subsystem/virtual/instance.pp index 048f394..7f08384 100644 --- a/manifests/subsystem/virtual/instance.pp +++ b/manifests/subsystem/virtual/instance.pp @@ -28,6 +28,8 @@ define nodo::subsystem::virtual::instance( $sshkey = '', $sshkey_type = 'ssh-rsa', $sshkey_options = [], + $initial_user = 'user', + $guest_domain = $::domain, ) { # Instance id if $context <= 9 { @@ -38,13 +40,19 @@ define nodo::subsystem::virtual::instance( if $implementation == 'kvmx' { virtual::kvm::kvmx::instance { $name: - vg => $vg, - size => $size, - ram => $ram, - udev => $udev, - iface => $iface, - shell => $shell, - supervise => $supervise, + vg => $vg, + size => $size, + ram => $ram, + udev => $udev, + iface => $iface, + shell => $shell, + supervise => $supervise, + initial_user => $initial_user, + ip => "${subnet}.${context}", + gateway => "${subnet}.1", + guest_domain => $guest_domain, + ssh_custom_pubkey => "/home/${name}/.ssh/authorized_keys", + #require => Ssh_authorized_key["virtual-instance-${name}"], } } -- cgit v1.2.3