Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfulve committed Aug 26, 2016
1 parent 64b146f commit 6c8be0c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bacchus-web/templates/default/nrsysmond.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ logfile=/var/log/newrelic/nrsysmond.log
# names generated by Docker containers).
# Default: The system configured host name
#
#hostname=<%= node[:opsworks][:stack][:name] + '-' + node[:opsworks][:instance][:hostname] %>
hostname=<%= node[:opsworks][:stack][:name] + '-' + node[:opsworks][:instance][:hostname] %>
#hostname=<%= 'ericstack-' + node[:opsworks][:instance][:hostname] %>
#hostname=xxx-java-app1

Expand Down
26 changes: 26 additions & 0 deletions opsworks_stack_state_sync/templates/default/hosts.erb
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 -%>

0 comments on commit 6c8be0c

Please sign in to comment.