aboutsummaryrefslogtreecommitdiffstats
path: root/modules/libvirtd/manifests/init.pp
blob: da04bbfa9a792577b89c1d8e518121300bea9768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
class libvirtd {
    class base {
        # make sure to use a recent enough version
        # dnsmasq-base -> for nat network
        # netcat-openbsd -> for ssh remote access
        # iptables -> for dhcp, message error was quite puzzling
        package { ["libvirt-utils","dnsmasq-base","netcat-openbsd","iptables"]:
        }

        service { libvirtd:
            ensure => running,
            path => "/etc/init.d/libvirtd",
        }
    }

    class kvm inherits base {
        # pull cyrus-sasl, should be checked
        package { "qemu":

        }
    
    }

    # 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,
            mode => 644,
            ensure => present,
            content => template("libvirtd/50-template-libvirt-remote-access.pkla"),
        }
    }
}