aboutsummaryrefslogtreecommitdiff
path: root/manifests/kvm/instance.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/kvm/instance.pp')
-rw-r--r--manifests/kvm/instance.pp19
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/kvm/instance.pp b/manifests/kvm/instance.pp
new file mode 100644
index 0000000..57e3bf0
--- /dev/null
+++ b/manifests/kvm/instance.pp
@@ -0,0 +1,19 @@
+define virtual::kvm::instance(
+ $udev = false,
+) {
+ user { $name:
+ ensure => present,
+ home => "/home/${name}",
+ groups => [ 'kvm' ],
+ }
+
+ if $udev == true {
+ file { "/etc/udev/rules.d/92-kvm-${name}.rules":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => '0644',
+ content => template('virtual/kvm.rules.erb'),
+ }
+ }
+}