Skip to content

Commit

Permalink
Issue vagrant-landrush#176 Create no reverse DNS entry for CNAME entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Pöche authored and hferentschik committed Jul 1, 2016
1 parent 5be2608 commit 4e421a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/landrush/action/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,19 @@ def setup_static_dns
unless Store.hosts.has?(hostname, dns_value)
info "adding static entry: #{hostname} => #{dns_value}"
Store.hosts.set hostname, dns_value
Store.hosts.set(IPAddr.new(dns_value).reverse, hostname)
unless static_dns_ip_address(dns_value).nil?
Store.hosts.set(IPAddr.new(dns_value).reverse, hostname)
end
end
end
end

def static_dns_ip_address(dns_value)
return IPAddr.new(dns_value)
rescue StandardError
return nil
end

def record_machine_dns_entry
ip_address = machine.config.landrush.host_ip_address || host_ip_address

Expand Down

0 comments on commit 4e421a0

Please sign in to comment.