Skip to content

Instantly share code, notes, and snippets.

@gswallow
Created October 23, 2013 15:31
Show Gist options
  • Save gswallow/7120939 to your computer and use it in GitHub Desktop.
Save gswallow/7120939 to your computer and use it in GitHub Desktop.
# File generated by Chef. Do not edit by hand.
<% unless node.platform_family =~ /windows/ -%>
127.0.0.1 localhost
<% end -%>
<%= "#{sprintf("%-15s%3s%-32s%4s%-s", @node.ipaddress, " ", @node.fqdn, " ", @node.hostname)}" %>
<% @hosts.sort { |a,b| a.hostname <=> b.hostname }.each do |h| -%>
<% unless h.ipaddress == @node.ipaddress -%>
<%= "#{sprintf("%-15s%3s%-32s%4s%-s", h.ipaddress, " ", h.fqdn, " ", h.hostname)}" %>
<% end -%>
<% end -%>
<% unless node.platform_family =~ /windows/ -%>
# IPv6 Voodoo
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
<% end -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment