Module: Vagrant::Butcher::Helpers::Guest

Included in:
Config, KeyFiles
Defined in:
lib/vagrant-butcher/helpers/guest.rb

Instance Method Summary collapse

Instance Method Details

#get_guest_key_path(env) ⇒ Object



10
11
12
13
14
# File 'lib/vagrant-butcher/helpers/guest.rb', line 10

def get_guest_key_path(env)
  return butcher_config(env).guest_key_path unless butcher_config(env).guest_key_path == :DEFAULT
  return 'c:\etc\chef\client.pem' if windows?(env)
  return '/etc/chef/client.pem'
end

#windows?(env) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/vagrant-butcher/helpers/guest.rb', line 6

def windows?(env)
  machine(env).guest.capability_host_chain.last.first == :windows
end