Class: VagrantPlugins::GuestFedora::Cap::Flavor

Inherits:
Object
  • Object
show all
Defined in:
plugins/guests/fedora/cap/flavor.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) flavor(machine)



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'plugins/guests/fedora/cap/flavor.rb', line 5

def self.flavor(machine)
  # Read the version file
  machine.communicate.sudo("grep VERSION_ID /etc/os-release") do |type, data|
    version = data.split("=")[1].chomp.to_i if type == :stdout
  end

  # Detect various flavors we care about
  if version >= 20
    return :fedora_#{version}"
  else
    return :fedora
  end
end