class SyncWrap::EtcHosts
Provision/update an RFC 952 /etc/hosts file for “internal” intra-Space host resolution. This can be used for simple internal network resolution instead of DNS.
Host component dependencies: none
Public Class Methods
new( opts = {} )
click to toggle source
Calls superclass method
SyncWrap::Component.new
# File lib/syncwrap/components/etc_hosts.rb, line 28 def initialize( opts = {} ) super end
Public Instance Methods
etc_host_table()
click to toggle source
# File lib/syncwrap/components/etc_hosts.rb, line 36 def etc_host_table host.space.hosts.map do |h| [ h[ :internal_ip ] || "# internal_ip?", [ h[ :name ] ] ] end end
install()
click to toggle source
# File lib/syncwrap/components/etc_hosts.rb, line 32 def install rput( "etc/hosts", user: :root ) end