Sha256: 4620ac169f658cd5289d2db68897c607c8166a9f980b349de58fe1c51bb91785

Contents?: true

Size: 545 Bytes

Versions: 6

Compression:

Stored size: 545 Bytes

Contents

module VagrantPlugins
  module GuestRocky
    module Cap
      class Flavor
        def self.flavor(machine)
          # Read the version file
          version = ""
          machine.communicate.sudo("source /etc/os-release && printf $VERSION_ID") do |type, data|
            if type == :stdout
              version = data.split(".").first.to_i
            end
          end

          if version.nil? || version < 1
            :rocky
          else
            "rocky_#{version}".to_sym
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/guests/rocky/cap/flavor.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/guests/rocky/cap/flavor.rb
vagrant-unbundled-2.3.3.0 plugins/guests/rocky/cap/flavor.rb
vagrant-unbundled-2.3.2.0 plugins/guests/rocky/cap/flavor.rb
vagrant-unbundled-2.2.19.0 plugins/guests/rocky/cap/flavor.rb
vagrant-unbundled-2.2.18.0 plugins/guests/rocky/cap/flavor.rb