aboutsummaryrefslogtreecommitdiff
path: root/manifests/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/kvm')
-rw-r--r--manifests/kvm/manager/instance.pp11
1 files changed, 11 insertions, 0 deletions
diff --git a/manifests/kvm/manager/instance.pp b/manifests/kvm/manager/instance.pp
index 4f52310..4957645 100644
--- a/manifests/kvm/manager/instance.pp
+++ b/manifests/kvm/manager/instance.pp
@@ -2,6 +2,7 @@ define virtual::kvm::manager::instance(
$vg,
$size,
$ram,
+ $udev = false,
) {
exec { "kvm-creator-${name}":
command => "/usr/local/sbin/kvm-creator create $name $vg $size $ram",
@@ -22,4 +23,14 @@ define virtual::kvm::manager::instance(
creates => "/etc/service/${name}",
require => [ Exec["kvm-creator-${name}"], User["${name}"] ],
}
+
+ if $udev == true {
+ file { "/etc/udev/rules.d/92-kvm_creator-${name}.rules":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ content => template('virtual/kvm_creator.rules.erb'),
+ }
+ }
}