Seth Vargo 084d62b5a6
guests/fedora: Move as a child of redhat
Fedora should have been a child of redhat for awhile now...
2016-07-18 21:12:54 -04:00

24 lines
532 B
Ruby

module VagrantPlugins
module GuestFedora
module Cap
class Flavor
def self.flavor(machine)
# Read the version file
version = nil
machine.communicate.sudo("grep VERSION_ID /etc/os-release") do |type, data|
if type == :stdout
version = data.split("=")[1].chomp.to_i
end
end
if version.nil?
return :fedora
else
return :"fedora_#{version}"
end
end
end
end
end
end