aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-10 15:04:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-10 15:04:06 -0300
commitc9c9675e9376d831b1975ccc0318c17dcfdae864 (patch)
treeb160bef13ad5e5823d42f17233dacee513340c4c
parent924d176b3fe76f15a16aa0623909eec08ab920b2 (diff)
downloadpuppet-virtual-c9c9675e9376d831b1975ccc0318c17dcfdae864.tar.gz
puppet-virtual-c9c9675e9376d831b1975ccc0318c17dcfdae864.tar.bz2
Adds virtual::kvm::kvmx::config
-rw-r--r--manifests/kvm/kvmx/config.pp16
1 files changed, 16 insertions, 0 deletions
diff --git a/manifests/kvm/kvmx/config.pp b/manifests/kvm/kvmx/config.pp
new file mode 100644
index 0000000..2424a0f
--- /dev/null
+++ b/manifests/kvm/kvmx/config.pp
@@ -0,0 +1,16 @@
+define virtual::kvm::kvmx::config(
+ $vm,
+ $param,
+ $value,
+) {
+ exec { "kvmx-config-${vm}-${param}":
+ #command => "/usr/local/bin/kvmx ${vm} config ${param} ${value}",
+ command => "/usr/local/bin/kvmx config ${param} ${value}",
+ user => $vm,
+ environment => [ "HOME=/home/${vm}" ],
+ cwd => "/home/${vm}/vms/${vm}",
+ #onlyif => "/usr/local/bin/kvmx config ${vm} ${param} | grep -v memory=\"${value}\"",
+ onlyif => "/usr/local/bin/kvmx config ${vm} ${param} | grep -v ^${value}$",
+ require => Exec["kvmx-init-${vm}"],
+ }
+}