127.0.0.1 localhost

<% if @node[:chef][:roles].include?('vagrant') %>
127.0.0.1 <%= @node[:fqdn] %> vagrant
<% end %>

<% if @node[:chef][:roles].include?('app') %>
127.0.0.1 app.fr2.ec2.internal app
<% end %>

# auto generated for internal usage
<% node[:ubuntu][:servers].each do |server| %>
<%= server[:ip] %> <%= server[:fqdn] %> <%= server[:alias] %>
<% end %>


# 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

127.0.0.1 localhost

<% if @node[:chef][:roles].include?('vagrant') %>
127.0.0.1 <%= @node[:fqdn] %> vagrant
<% end %>

# auto generated for internal usage
<% node[:ubuntu][:app_servers].each do |server| %>
  <%= server[:ip] %> <%= server[:fqdn] %> <%= server[:alias] %>
<% end %>

<% node[:ubuntu][:my_fr2_servers].each do |server| %>
  <%= server[:ip] %> <%= server[:fqdn] %> <%= server[:alias] %>
<% end %>

<% node[:ubuntu][:servers].each do |server| %>
<%= server[:ip] %> <%= server[:fqdn] %> <%= server[:alias] %>
<% end %>


# 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

Create an etc/host entry for every server
Create an etc/host entry for every server