aboutsummaryrefslogtreecommitdiff
path: root/manifests/kvm/manager
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-10-15 15:24:24 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-10-15 15:24:24 -0300
commit5cbcdb956b0bacb02229ca2085aa1245e7308dcc (patch)
tree636506f32a8c1d56a9abe47638603d495a535df6 /manifests/kvm/manager
parentbb027aa4e2946d9875aa1499f22cddde3d41fea3 (diff)
downloadpuppet-virtual-5cbcdb956b0bacb02229ca2085aa1245e7308dcc.tar.gz
puppet-virtual-5cbcdb956b0bacb02229ca2085aa1245e7308dcc.tar.bz2
Adds udev param into virtual::kvm::manager
Diffstat (limited to 'manifests/kvm/manager')
-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'),
+ }
+ }
}