aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-10 13:55:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-10 13:55:06 -0300
commite782bd3b16acb41948f7386add8af6902b21f741 (patch)
tree5e4616c0f523e15ccef1f3d8510ab4b29cfd9e07
parent92342cd1bfcd0129a1526fe0773ee69ff14a3e29 (diff)
downloadpuppet-virtual-e782bd3b16acb41948f7386add8af6902b21f741.tar.gz
puppet-virtual-e782bd3b16acb41948f7386add8af6902b21f741.tar.bz2
Adds virtual::kvm::kvmx::config
-rw-r--r--manifests/kvm/kvmx/instance.pp26
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,
}
}