Module: VagrantPlugins::Dotvm::Injector::Host

Extended by:
AbstractInjector
Defined in:
lib/vagrant-dotvm/injector/host.rb

Overview

Injects DotVm host configuration into Vagrant

Class Method Summary collapse

Methods included from AbstractInjector

generate_hash, rewrite_hash, rewrite_options

Class Method Details

.inject(host: nil, machine: nil) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/vagrant-dotvm/injector/host.rb', line 10

def inject(host: nil, machine: nil)
  machine.vm.provision 'shell', run: 'always' do |s|
    s.path       = "#{UTILS_PATH}/add_host.sh"
    s.args       = [host.ip, host.host]
    s.privileged = true
    s.name       = "host #{host.host} -> #{host.ip}"
  end
end