Sha256: a5f83de974c1b4e567087089417323fb1650375e515496b1d79f0bf71594f5a7

Contents?: true

Size: 725 Bytes

Versions: 44

Compression:

Stored size: 725 Bytes

Contents

# If you export HOSTS_FOR_ALL_DCS, then your /etc/hosts will contain
# all consul registered nodes for all DCs, otherwise, only local
# nodes will be dumped
# This file is auto-generated and generates a suitable /etc/hosts
127.0.0.1       localhost localhost.localdomain

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

<%
dcs = if ENV['HOSTS_FOR_ALL_DCS']
        datacenters
      else
        # Only for local DC
        [nil]
      end
dcs.each do |current_dc|
  nodes(dc: current_dc).each do |snode|
%><%= snode['Address'] %>	<%= snode['Node'] %>
<%
  end
end
%>

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
consul-templaterb-1.36.2 samples/hosts.erb
consul-templaterb-1.36.1 samples/hosts.erb
consul-templaterb-1.35.1 samples/hosts.erb
consul-templaterb-1.34.1 samples/hosts.erb
consul-templaterb-1.33.3 samples/hosts.erb
consul-templaterb-1.33.2 samples/hosts.erb
consul-templaterb-1.33.1 samples/hosts.erb
consul-templaterb-1.33.0 samples/hosts.erb
consul-templaterb-1.32.1 samples/hosts.erb
consul-templaterb-1.32.0 samples/hosts.erb
consul-templaterb-1.31.1 samples/hosts.erb
consul-templaterb-1.31.0 samples/hosts.erb
consul-templaterb-1.30.0 samples/hosts.erb
consul-templaterb-1.29.0 samples/hosts.erb
consul-templaterb-1.28.2 samples/hosts.erb
consul-templaterb-1.28.1 samples/hosts.erb
consul-templaterb-1.28.0 samples/hosts.erb
consul-templaterb-1.27.2 samples/hosts.erb
consul-templaterb-1.27.1 samples/hosts.erb
consul-templaterb-1.27.0 samples/hosts.erb