aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-02-10 12:20:05 +0000
committerMichael Scherer <misc@mageia.org>2011-02-10 12:20:05 +0000
commit7de7489a647d3cab4fc427d532b9e615b1291fde (patch)
tree4be84ec2075205aed5135e6c209b936f9c64e98e /modules
parent594d8b5035ac31f6f84c9c71fe2c47ec4a8188c0 (diff)
downloadpuppet-7de7489a647d3cab4fc427d532b9e615b1291fde.tar
puppet-7de7489a647d3cab4fc427d532b9e615b1291fde.tar.gz
puppet-7de7489a647d3cab4fc427d532b9e615b1291fde.tar.bz2
puppet-7de7489a647d3cab4fc427d532b9e615b1291fde.tar.xz
puppet-7de7489a647d3cab4fc427d532b9e615b1291fde.zip
add support for letting group based vm management
Diffstat (limited to 'modules')
-rw-r--r--modules/libvirtd/manifests/init.pp13
-rw-r--r--modules/libvirtd/templates/50-template-libvirt-remote-access.pkla6
2 files changed, 19 insertions, 0 deletions
diff --git a/modules/libvirtd/manifests/init.pp b/modules/libvirtd/manifests/init.pp
index 2d4f8843..70517fca 100644
--- a/modules/libvirtd/manifests/init.pp
+++ b/modules/libvirtd/manifests/init.pp
@@ -20,4 +20,17 @@ class libvirtd {
}
}
+
+ # see http://wiki.libvirt.org/page/SSHPolicyKitSetup
+ define group_access() {
+ # to pull polkit and create the directory
+ include libvirtd::base
+ file { "/etc/polkit-1/localauthority/50-local.d/50-$name-libvirt-remote-access.pkla":
+ owner => root,
+ group => root,
+ perms => 644,
+ ensure => present,
+ content => template("libvirtd/50-template-libvirt-remote-access.pkla"),
+ }
+ }
}
diff --git a/modules/libvirtd/templates/50-template-libvirt-remote-access.pkla b/modules/libvirtd/templates/50-template-libvirt-remote-access.pkla
new file mode 100644
index 00000000..201e89a0
--- /dev/null
+++ b/modules/libvirtd/templates/50-template-libvirt-remote-access.pkla
@@ -0,0 +1,6 @@
+[Remote libvirt SSH access]
+Identity=unix-user:root;unix-group:<%= name %>
+Action=org.libvirt.unix.manage
+ResultAny=yes
+ResultInactive=yes
+ResultActive=yes