Sha256: 7d7b5a56f5dafefd8a7623c2b3a020f36e58d6ac6e71e600ed2a64b3c1b29a0e

Contents?: true

Size: 678 Bytes

Versions: 8

Compression:

Stored size: 678 Bytes

Contents

module VagrantPlugins
  module GuestRedHat
    module Cap
      class Flavor
        def self.flavor(machine)
          # Read the version file
          output = ""
          machine.communicate.sudo("cat /etc/redhat-release") do |_, data|
            output = data
          end

          # Detect various flavors we care about
          if output =~ /(Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 7/i
            return :rhel_7
          elsif output =~ /(Red Hat Enterprise|Scientific|Cloud|Virtuozzo)\s*Linux( .+)? release 8/i
            return :rhel_8
          else
            return :rhel
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
vagrant-unbundled-2.2.19.0 plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-2.2.18.0 plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-2.2.16.0 plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-2.2.14.0 plugins/guests/redhat/cap/flavor.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-2.2.10.0 plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-2.2.9.0 plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-2.2.8.0 plugins/guests/redhat/cap/flavor.rb