class VagrantVbguest::Installers::RedHat

Public Class Methods

match?(vm) click to toggle source

Scientific Linux and CentOS show up as :redhat (or “centos7”) fortunately they’re probably both similar enough to RHEL (RedHat Enterprise Linux) not to matter.

# File lib/vagrant-vbguest/installers/redhat.rb, line 7
def self.match?(vm)
  /\A(redhat|centos|amazon)\d*\Z/ =~ self.distro(vm)
end

Public Instance Methods

install(opts=nil, &block) click to toggle source

Install missing deps and yield up to regular linux installation

# File lib/vagrant-vbguest/installers/redhat.rb, line 12
def install(opts=nil, &block)
  communicate.sudo(install_dependencies_cmd, opts, &block)
  super
end

Protected Instance Methods

dependencies() click to toggle source
# File lib/vagrant-vbguest/installers/redhat.rb, line 22
def dependencies
  [
    'kernel-devel',
    'kernel-devel-`uname -r`',
    'gcc',
    'binutils',
    'make',
    'perl',
    'bzip2'
  ].join(' ')
end
install_dependencies_cmd() click to toggle source
# File lib/vagrant-vbguest/installers/redhat.rb, line 18
def install_dependencies_cmd
  "yum install -y #{dependencies}"
end