Sha256: 2a44f35d3be7e2ba78255dc79ecdc7ba616a07841b1bc04e166f51443a8409c0

Contents?: true

Size: 922 Bytes

Versions: 17

Compression:

Stored size: 922 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

17 entries across 17 versions & 1 rubygems

Version Path
cloud-mu-2.1.0beta cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.3 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.1 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.beta3 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.beta2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.beta1 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha9 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha8 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha7 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha6 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha5 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha4 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha3 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha2 cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-2.0.0.pre.alpha cookbooks/mu-tools/templates/default/etc_hosts.erb
cloud-mu-1.9.0.pre.beta cookbooks/mu-tools/templates/default/etc_hosts.erb