Sha256: 39ce5783c0b4c7b49dc1a2e366ebeaeb5a8d8a03ebb4138c17719636ab7b191b

Contents?: true

Size: 861 Bytes

Versions: 20

Compression:

Stored size: 861 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)
        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

20 entries across 20 versions & 1 rubygems

Version Path
beaker-hostgenerator-2.1.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-2.0.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.18.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.18.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.17.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.16.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.15.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.14.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.13.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.12.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.11.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.11.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.10.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.9.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.8.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.7.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.7.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.6.1 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.6.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb
beaker-hostgenerator-1.5.0 lib/beaker-hostgenerator/hypervisor/vagrant.rb