diff options
-rw-r--r-- | manifests/kvm/kvmx/instance.pp | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/manifests/kvm/kvmx/instance.pp b/manifests/kvm/kvmx/instance.pp index ee1dac3..edbab91 100644 --- a/manifests/kvm/kvmx/instance.pp +++ b/manifests/kvm/kvmx/instance.pp @@ -29,25 +29,15 @@ define virtual::kvm::kvmx::instance( require => Virtual::Kvm::Instance["$name"], } - exec { "kvmx-config-${name}-ram": - #command => "/usr/local/bin/kvmx $name config memory ${ram}", - command => "/usr/local/bin/kvmx config memory ${ram}", - user => $name, - environment => [ "HOME=/home/${name}" ], - cwd => "/home/${name}/vms/${name}", - #onlyif => "/usr/local/bin/kvmx config ${name} memory | grep -v memory=\"${ram}\"", - onlyif => "/usr/local/bin/kvmx config ${name} memory | grep -v ^${ram}", - require => Exec["kvmx-init-${name}"], + virtual::kvm::kvmx::config { "${name}-memory": + vm => $name, + param => 'memory', + value => $ram, } - exec { "kvmx-config-${name}-size": - #command => "/usr/local/bin/kvmx ${name} config size ${size}", - command => "/usr/local/bin/kvmx config size ${size}", - user => $name, - environment => [ "HOME=/home/${name}" ], - cwd => "/home/${name}/vms/${name}", - #onlyif => "/usr/local/bin/kvmx config ${name} size | grep -v memory=\"${size}\"", - onlyif => "/usr/local/bin/kvmx config ${name} size | grep -v ^${size}", - require => Exec["kvmx-init-${name}"], + virtual::kvm::kvmx::config { "${name}-size": + vm => $name, + param => 'size', + value => $size, } } |