diff options
author | Michael Scherer <misc@mageia.org> | 2011-02-10 12:20:05 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2011-02-10 12:20:05 +0000 |
commit | 7de7489a647d3cab4fc427d532b9e615b1291fde (patch) | |
tree | 4be84ec2075205aed5135e6c209b936f9c64e98e /modules | |
parent | 594d8b5035ac31f6f84c9c71fe2c47ec4a8188c0 (diff) | |
download | puppet-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.pp | 13 | ||||
-rw-r--r-- | modules/libvirtd/templates/50-template-libvirt-remote-access.pkla | 6 |
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 |