Puppet Class: virtualbox::kernel

Defined in:
manifests/kernel.pp

Summary

compiles and installs the VirtualBox kernel modules

Overview

compiles and installs the VirtualBox kernel modules and dependencies.

Parameters:

  • manage_repo (Boolean) (defaults to: $virtualbox::manage_repo)

    Should this module manage the package repository?

  • vboxdrv_dependencies (Array) (defaults to: $virtualbox::vboxdrv_dependencies)

    Dependencies for building the VirtualBox kernel modules.

  • vboxdrv_command (String) (defaults to: $virtualbox::vboxdrv_command)


12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'manifests/kernel.pp', line 12

class virtualbox::kernel (
  Boolean $manage_repo        = $virtualbox::manage_repo,
  Array $vboxdrv_dependencies = $virtualbox::vboxdrv_dependencies,
  String $vboxdrv_command     = $virtualbox::vboxdrv_command
) {
  ensure_packages($vboxdrv_dependencies)

  exec { 'vboxdrv':
    command     => "${vboxdrv_command} setup",
    unless      => '/sbin/lsmod | grep vboxdrv',
    environment => ["KERN_DIR=/lib/modules/${facts['kernelrelease']}/build"],
    require     => Package[$vboxdrv_dependencies],
  }
}