blob: 2048572ae80dfef125ca88b4e1e77347a96758e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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}$ || test `/usr/local/bin/kvmx config ${vm} ${param} | wc -l` -eq 0",
require => Exec["kvmx-init-${vm}"],
}
}
|