Class: Landrush::Cap::Darwin::ConfigureVisibilityOnHost

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.config_dir=(value) ⇒ Object

Sets the attribute config_dir

Parameters:

  • value

    the value to set the attribute config_dir to.



6
7
8
# File 'lib/landrush/cap/host/darwin/configure_visibility_on_host.rb', line 6

def config_dir=(value)
  @config_dir = value
end

.sudo=(value) ⇒ Object

Sets the attribute sudo

Parameters:

  • value

    the value to set the attribute sudo to.



6
7
8
# File 'lib/landrush/cap/host/darwin/configure_visibility_on_host.rb', line 6

def sudo=(value)
  @sudo = value
end

Class Method Details

.configure_visibility_on_host(env, _ip, tlds) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/landrush/cap/host/darwin/configure_visibility_on_host.rb', line 8

def configure_visibility_on_host(env, _ip, tlds)
  @env = env

  tlds.each do |tld|
    if contents_match?(tld)
      info "Host DNS resolver config for TLD '#{tld}' looks good."
    else
      info "Need to create /etc/resolver entry for TLD '#{tld}'"
      write_config!(tld)
    end
  end
end