Sha256: a4ef08a5ccad47c03d18fc4f036af4a51bb79acad3e6053bf92e73de26617ac2

Contents?: true

Size: 938 Bytes

Versions: 13

Compression:

Stored size: 938 Bytes

Contents

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

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

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

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

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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
beaker-hostgenerator-2.9.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.8.2 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.8.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.8.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.7.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.6.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.5.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.4.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.3.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.2.3 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.2.2 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.2.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.2.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb