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
64
65
66
67
|
# File 'manifests/init.pp', line 30
class virtualbox (
String $version = '5.1',
String $package_ensure = 'present',
String $package_name = $virtualbox::params::package_name,
Boolean $manage_repo = $virtualbox::params::manage_repo,
Boolean $manage_ext_repo = true,
Boolean $manage_package = true,
Boolean $manage_kernel = true,
Array $vboxdrv_dependencies = $virtualbox::params::vboxdrv_dependencies,
Optional[String] $repo_proxy = undef,
) inherits virtualbox::params {
# this warning is never reached. If Puppet < 4 is used with tis module,
# Puppet fail with error about data type like "Syntax error at 'String'; expected ')'"
if versioncmp($::puppetversion, '4.0.0') == -1 {
warning 'Support for Puppet < 3.0 is deprecated. Version 2.0 of this module will only support Puppet >= 4.0' # lint:ignore:80chars
}
if versioncmp($version, '5.0') == -1 {
$vboxdrv_command = '/etc/init.d/vboxdrv'
} else {
$vboxdrv_command = '/usr/lib/virtualbox/vboxdrv.sh'
}
class { 'virtualbox::install': } -> Class['virtualbox']
if $manage_kernel {
Class['virtualbox::install'] -> class { 'virtualbox::kernel': }
if $::osfamily == 'RedHat' {
if $manage_ext_repo {
include epel
Class['epel'] -> Class['virtualbox::kernel']
}
}
}
}
|