Puppet Class: nova::compute::libvirt::version

Inherited by:
nova::compute::libvirt::qemu
Defined in:
manifests/compute/libvirt/version.pp

Overview

Class: nova::compute::libvirt::version

Try to detect the version by OS Right now this is only used by nova::compute::libvirt::qemu and the interesting version is with which release there will be libvirt 4.5 or higher.



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
# File 'manifests/compute/libvirt/version.pp', line 8

class nova::compute::libvirt::version {
  # This will be 7.5 or 7.6 on RedHat, 9 on Debian, 18.10 or cosmic on Ubuntu, etc.
  case $facts['os']['family'] {
    'RedHat': {
      case $facts['os']['name'] {
        'RedHat', 'CentOS': {
          if versioncmp($facts['os']['release']['full'], '7.6') >= 0 {
            $default = '4.5'
          } else {
            $default = '3.9'
          }
        }
        'Fedora': {
          if versioncmp($facts['os']['release']['full'], '29') >= 0 {
            $default = '4.5'
          } else {
            $default = '3.9'
          }
        }
        default: {
          $default = '3.9'
        }
      }
    }
    'Debian': {
      if versioncmp($facts['os']['release']['full'], '18.10') >= 0 {
        $default = '4.6'
      } else {
        $default = '4.0'
      }
    }
    default: {
      fail("Class['nova::compute::libvirt::version']: Unsupported osfamily: ${::osfamily}")
    }
  }
}