Sha256: 1565422f3c3586e447ea8d3e9ce4c004874ef1beb35a51a582de814a64ff1e5a

Contents?: true

Size: 847 Bytes

Versions: 28

Compression:

Stored size: 847 Bytes

Contents

require 'beaker-hostgenerator/data'
require 'beaker-hostgenerator/hypervisor'
require 'deep_merge'

module BeakerHostGenerator
  module Hypervisor
    class Vagrant < BeakerHostGenerator::Hypervisor::Interface
      include BeakerHostGenerator::Data

      def generate_node(node_info, base_config, bhg_version)
        if node_info['ostype'] =~ /^centos/
          base_config['box'] = node_info['ostype'].sub(/(\d)/, '/\1')
        elsif node_info['ostype'] =~ /^fedora/
          base_config['box'] = node_info['ostype'].sub(/(\d)/, '/\1') + 'cloud-base'
        else
          base_config['box'] = "generic/#{node_info['ostype']}"
        end

        # We don't use this by default
        base_config['synced_folder'] = 'disabled'

        return base_generate_node(node_info, base_config, bhg_version, :vagrant)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
beaker-hostgenerator-1.2.7 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.6 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.5 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.4 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.3 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.2 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.2.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.44 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.43 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.42 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.41 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.40 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.39 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.38 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.37 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.36 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.35 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.34 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.1.33 lib/beaker-hostgenerator/hypervisor/vagrant.rb