Class: Landrush::Cap::Linux::ConfigureVisibilityOnHost

Inherits:
Object
  • Object
show all
Defined in:
lib/landrush/cap/host/linux/configure_visibility_on_host.rb

Class Method Summary collapse

Class Method Details

.configure_visibility_on_host(env, ip, tld) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/landrush/cap/host/linux/configure_visibility_on_host.rb', line 6

def configure_visibility_on_host(env, ip, tld)
  env.host.capability(:install_dnsmasq) unless env.host.capability(:dnsmasq_installed)
  env.host.capability(:create_dnsmasq_config, ip, tld)
  env.host.capability(:restart_dnsmasq)
rescue Vagrant::Errors::CapabilityNotFound => e
  env.ui.info("Your host was detected as '#{e.extra_data[:cap]}' for which the host capability " \
  "'#{e.extra_data[:cap]}' is not available.")
  env.ui.info('Check the documentation for the manual instructions to configure the visibility on the host.')
end