Sha256: 5fbb59bac9507e70bfc2749ce07defb03c201e576654454aeba6c2fb9b86870b

Contents?: true

Size: 586 Bytes

Versions: 6

Compression:

Stored size: 586 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 |type, data|
            output += data if type == :stdout
          end
          output.chomp!

          # Detect various flavors we care about
          if output =~ /(CentOS|Red Hat Enterprise|Scientific) Linux( .+)? release 7/i
            return :rhel_7
          else
            return :rhel
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 3 versions & 2 rubygems

Version Path
vagrant-unbundled-1.8.1.2 plugins/guests/redhat/cap/flavor.rb
vagrant-unbundled-1.8.1.1 plugins/guests/redhat/cap/flavor.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-1cf2a8db4ccb/plugins/guests/redhat/cap/flavor.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-272fb27e0536/plugins/guests/redhat/cap/flavor.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-309e896975d1/plugins/guests/redhat/cap/flavor.rb
vagrant-cloudstack-1.1.0 vendor/bundle/bundler/gems/vagrant-b421af58e8b3/plugins/guests/redhat/cap/flavor.rb