File: version.pp

package info (click to toggle)
puppet-module-nova 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,068 kB
  • sloc: ruby: 11,144; python: 33; makefile: 10; sh: 10
file content (30 lines) | stat: -rw-r--r-- 710 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
# 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 = '8.0'
    }
    'Debian': {
      case $facts['os']['name'] {
        'Ubuntu': {
          $default = '10.0'
        }
        'Debian': {
          $default = '9.0'
        }
        default: {
          fail("Unsupported osname: ${::facts['os']['name']}")
        }
      }
    }
    default: {
      fail("Unsupported osfamily: ${::facts['os']['family']}")
    }
  }
}