Sha256: 7ef47503780ea9079456d7a2341142098fd18cc14eb646bf926bb20b16cf3d01

Contents?: true

Size: 901 Bytes

Versions: 8

Compression:

Stored size: 901 Bytes

Contents

module VagrantVbguest
  module Installers
    class RedHat < Linux
      # 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.
      def self.match?(vm)
        /\A(redhat|centos)\d*\Z/ =~ self.distro(vm)
      end

      # Install missing deps and yield up to regular linux installation
      def install(opts=nil, &block)
        communicate.sudo(install_dependencies_cmd, opts, &block)
        super
      end

    protected
      def install_dependencies_cmd
        "yum install -y #{dependencies}"
      end

      def dependencies
        packages = [
          'kernel-devel-`uname -r`', 'gcc', 'binutils', 'make', 'perl', 'bzip2'
        ]
        packages.join ' '
      end
    end
  end
end
VagrantVbguest::Installer.register(VagrantVbguest::Installers::RedHat, 5)

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vagrant-vbguest-0.15.1 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.15.0 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.14.2 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.14.1 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.14.0 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.14.0.pre.beta1 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.13.0 lib/vagrant-vbguest/installers/redhat.rb
vagrant-vbguest-0.12.0 lib/vagrant-vbguest/installers/redhat.rb