-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This file was generated by OpsWorks | ||
# any manual changes will be removed on the next update. | ||
|
||
# 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 | ||
|
||
# OpsWorks Layer State | ||
127.0.0.1 localhost localhost.localdomain | ||
127.0.1.1 <%= node[:opsworks][:instance][:hostname] %>.localdomain <%= node[:opsworks][:stack][:name] + '-' + node[:opsworks][:instance][:hostname] %> | ||
<% seen = [] -%> | ||
<% node[:opsworks][:layers].each do |layer_name, layer_config| -%> | ||
<% layer_config[:instances].each do |instance_name, instance_config| -%> | ||
<% if !seen.include?(instance_name) && instance_config[:private_ip] -%> | ||
<%= Resolv.getaddress(instance_config[:private_ip]) %> <%= node[:opsworks][:stack][:name] + '-' + instance_name %> | ||
<% if instance_config[:ip] %> | ||
<%= Resolv.getaddress(instance_config[:ip]) %> <%= node[:opsworks][:stack][:name] + '-' + instance_name %>-ext | ||
<% end %> | ||
<% seen << instance_name %> | ||
<% end -%> | ||
<% end -%> | ||
<% end -%> |