Puppet Class: libvirt::params

Inherited by:
libvirt
Defined in:
manifests/params.pp

Overview

Class: libvirt::params

Operating system dependent parameters



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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'manifests/params.pp', line 4

class libvirt::params {
  case $::osfamily {
    'Debian': {
      case $::lsbdistcodename {
        'wheezy': {
          $libvirt_package_names  = ['libvirt-bin', 'qemu']
          $service_name           = 'libvirt-bin'
        }
        'jessie': {
          $libvirt_package_names  = ['libvirt-daemon-system', 'qemu']
          $service_name           = 'libvirtd'
        }
        'stretch': {
          $libvirt_package_names  = ['libvirt-daemon-system', 'qemu']
          $service_name           = 'libvirtd'
        }
        'trusty', 'xenial': {
          $libvirt_package_names  = ['libvirt-bin', 'qemu-kvm']
          $service_name           = 'libvirt-bin'
        }
        'artful': {
          $libvirt_package_names  = ['libvirt-bin', 'qemu-kvm']
          $service_name           = 'libvirtd'
        }
        'bionic': {
          $libvirt_package_names  = ['libvirt-daemon-system', 'libvirt-clients', 'qemu-kvm']
          $service_name           = 'libvirtd'
        }
        default: {
          fail("${::lsbdistcodename} is currently not supported by the libvirt
                module. Please add support for it and submit a patch!")
        }
      }
      $config_dir             = '/etc/libvirt'
      $manage_domains_config  = '/etc/manage-domains.ini'
      $qemu_hook_packages     = {'drbd' => ['xmlstarlet','python-libvirt'], }
    }

    'RedHat': {
      case $::operatingsystemmajrelease {
        '7': {
          $libvirt_package_names  = ['libvirt', 'qemu-kvm']
          $service_name           = 'libvirtd'
        }
        default: {
          fail("RedHat ${::operatingsystemmajrelease} is currently not supported by the libvirt module.
               Please add support for it and submit a patch!")
        }
      }
      $config_dir             = '/etc/libvirt'
      $manage_domains_config  = '/etc/manage-domains.ini'
      $qemu_hook_packages     = { }
    }

    default: {
      fail("${::osfamily} is currently not supported by the libvirt module.
            Please add support for it and submit a patch!")
    }
  }
}