File: version.pp

package info (click to toggle)
puppet-module-nova 25.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,100 kB
  • sloc: ruby: 11,433; python: 38; sh: 10; makefile: 10
file content (34 lines) | stat: -rw-r--r-- 842 bytes parent folder | download
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
# 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.
#
class nova::compute::libvirt::version {
  case $facts['os']['family'] {
    'RedHat': {
      $default = '7.0'
    }
    'Debian': {
      case $facts['os']['name'] {
        'Ubuntu': {
          $default = '8.0'
        }
        'Debian': {
          if versioncmp($facts['os']['release']['major'], '12') >= 0 {
            $default = '9.0'
          } else {
            $default = '7.0'
          }
        }
        default: {
          fail("Unsupported osname: ${::facts['os']['name']}")
        }
      }
    }
    default: {
      fail("Unsupported osfamily: ${::facts['os']['family']}")
    }
  }
}