Sha256: d7061464cca2b7e95044e7c809563bf11655a27d94a714c6551f01f4d7ad54a1

Contents?: true

Size: 925 Bytes

Versions: 20

Compression:

Stored size: 925 Bytes

Contents

::1             localhost6.localdomain6 localhost6
<%= @ipaddress %> <%= @hostname %>
127.0.0.1 localhost
<% if !@nodes.nil? and !@nodes.empty?
  @nodes.each{ |n|
# doing only private IPs although that can be problematic 
# if the same deploy has cross VPC or cross region resources
  if n.name != @hostname %>
<%= n['ipaddress'] %> <%= n.name %>
<%
  end
  }
else
  if !node['deployment'].nil? and !node['deployment']['servers'].nil?
    node['deployment']['servers'].each_pair { |nodetype, sibling_struct|
      next if !sibling_struct.is_a?(Hash)
      sibling = sibling_struct.values.each { |sibling|
        next if !sibling.is_a?(Hash)
        next if sibling['nodename'] == @hostname
        if !sibling['public_ip_address'].nil? %>
<%= sibling['public_ip_address'] %> <%= sibling['nodename'] %>
  <%		else %>
<%= sibling['private_ip_address'] %> <%= sibling['nodename'] %>
  <%
        end
      }
    }
  end
end
%>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
cloud-mu-3.5.1 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.5.0 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.4.0 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.3.2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.3.1 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.3.0 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.2.0 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.6 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.5 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.4 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.3 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.2beta2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.1 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.1.0 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.0.2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.0.1 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.0.0 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-3.0.0beta cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.4 cookbooks/mu-tools/templates/default/etc_hosts.erb