Skip to content

Commit

Permalink
update erb templates to use instance variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Oct 14, 2013
1 parent 0b6c068 commit d327d2b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions templates/conf.php.el6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ $graphdir='./graph.d';
# Although, it would be strange to alter the IP since the Round-Robin
# databases need to be local to be read.
#
$ganglia_ip = "<%= ganglia_ip %>";
$ganglia_port = <%= ganglia_port %>;
$ganglia_ip = "<%= @ganglia_ip %>";
$ganglia_port = <%= @ganglia_port %>;

#
# The maximum number of dynamic graphs to display. If you set this
Expand Down
6 changes: 3 additions & 3 deletions templates/gmetad.conf.el6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# data_source "my grid" 50 1.3.4.7:8655 grid.org:8651 grid-backup.org:8651
# data_source "another source" 1.3.4.7:8655 1.3.4.8

<% clusters.each do |data_source| -%>
<% @clusters.each do |data_source| -%>
data_source "<%= data_source['name'] -%>"<% if data_source['polling_interval'] then -%>
<%= data_source['polling_interval'] -%>
<%- end -%>
Expand Down Expand Up @@ -67,8 +67,8 @@ data_source "<%= data_source['name'] -%>"<% if data_source['polling_interval'] t
# The name of this Grid. All the data sources above will be wrapped in a GRID
# tag with this name.
# default: unspecified
<% if gridname then -%>
gridname "<%= gridname %>"
<% if @gridname then -%>
gridname "<%= @gridname %>"
<% else -%>
# gridname "MyGrid"
<% end -%>
Expand Down
16 changes: 8 additions & 8 deletions templates/gmond.conf.el5.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ globals {
* of a <CLUSTER> tag. If you do not specify a cluster tag, then all <HOSTS> will
* NOT be wrapped inside of a <CLUSTER> tag. */
cluster {
name = "<%= cluster_name %>"
owner = "<%= cluster_owner %>"
latlong = "<%= cluster_latlong %>"
url = "<%= cluster_url %>"
name = "<%= @cluster_name %>"
owner = "<%= @cluster_owner %>"
latlong = "<%= @cluster_latlong %>"
url = "<%= @cluster_url %>"
}

/* The host section describes attributes of the host, like the location */
host {
location = "<%= host_location %>"
location = "<%= @host_location %>"
}

/* Feel free to specify as many udp_send_channels as you like. Gmond
used to only support having a single channel */
<% udp_send_channel.each do |channel| -%>
<% @udp_send_channel.each do |channel| -%>
udp_send_channel {
<%- if channel['mcast_join'] then -%>
mcast_join = <%= channel['mcast_join'] %>
Expand All @@ -48,7 +48,7 @@ udp_send_channel {

<% end -%>
/* You can specify as many udp_recv_channels as you like as well. */
<% udp_recv_channel.each do |channel| -%>
<% @udp_recv_channel.each do |channel| -%>
udp_recv_channel {
<%- if channel['mcast_join'] then -%>
mcast_join = <%= channel['mcast_join'] %>
Expand All @@ -64,7 +64,7 @@ udp_recv_channel {
<% end -%>
/* You can specify as many tcp_accept_channels as you like to share
an xml description of the state of the cluster */
<% tcp_accept_channel.each do |channel| -%>
<% @tcp_accept_channel.each do |channel| -%>
tcp_accept_channel {
<%- if channel['port'] then -%>
port = <%= channel['port'] %>
Expand Down
16 changes: 8 additions & 8 deletions templates/gmond.conf.el6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ globals {
* tag that will wrap all hosts collected by this instance.
*/
cluster {
name = "<%= cluster_name %>"
owner = "<%= cluster_owner %>"
latlong = "<%= cluster_latlong %>"
url = "<%= cluster_url %>"
name = "<%= @cluster_name %>"
owner = "<%= @cluster_owner %>"
latlong = "<%= @cluster_latlong %>"
url = "<%= @cluster_url %>"
}

/* The host section describes attributes of the host, like the location */
host {
location = "<%= host_location %>"
location = "<%= @host_location %>"
}

/* Feel free to specify as many udp_send_channels as you like. Gmond
used to only support having a single channel */
<% udp_send_channel.each do |channel| -%>
<% @udp_send_channel.each do |channel| -%>
udp_send_channel {
<%- if channel['mcast_join'] then -%>
mcast_join = <%= channel['mcast_join'] %>
Expand All @@ -51,7 +51,7 @@ udp_send_channel {

<% end -%>
/* You can specify as many udp_recv_channels as you like as well. */
<% udp_recv_channel.each do |channel| -%>
<% @udp_recv_channel.each do |channel| -%>
udp_recv_channel {
<%- if channel['mcast_join'] then -%>
mcast_join = <%= channel['mcast_join'] %>
Expand All @@ -67,7 +67,7 @@ udp_recv_channel {
<% end -%>
/* You can specify as many tcp_accept_channels as you like to share
an xml description of the state of the cluster */
<% tcp_accept_channel.each do |channel| -%>
<% @tcp_accept_channel.each do |channel| -%>
tcp_accept_channel {
<%- if channel['port'] then -%>
port = <%= channel['port'] %>
Expand Down

0 comments on commit d327d2b

Please sign in to comment.