Sha256: cf078fcd1cceaba53b55d6debf68b8fd14ae6af741f9b7c3d5597b421649f664
Contents?: true
Size: 574 Bytes
Versions: 8
Compression:
Stored size: 574 Bytes
Contents
module VagrantPlugins module GuestCentos module Cap class Flavor def self.flavor(machine) # Read the version file output = "" machine.communicate.sudo("cat /etc/centos-release") do |_, data| output = data end # Detect various flavors we care about if output =~ /(CentOS)( .+)? 7/i return :centos_7 elsif output =~ /(CentOS)( .+)? 8/i return :centos_8 else return :centos end end end end end end
Version data entries
8 entries across 8 versions & 2 rubygems