diff --git a/Rakefile b/Rakefile index 61aa00d..9cfa569 100644 --- a/Rakefile +++ b/Rakefile @@ -53,6 +53,7 @@ ips ||= YAML.load_file(ips_file) config ||= YAML.load_file(config_file) firewall ||= File.open(iptables_file).read $nodes.each do |node| + node.data['environment'] = $SPB_ENV node.data['config'] = config node.data['peers'] = ips node.data['firewall'] = firewall diff --git a/cookbooks/munin/templates/hosts.conf.erb b/cookbooks/munin/templates/hosts.conf.erb index 8b6c0d7..ab6dda6 100644 --- a/cookbooks/munin/templates/hosts.conf.erb +++ b/cookbooks/munin/templates/hosts.conf.erb @@ -1,4 +1,4 @@ <% node['peers'].each do |hostname,ip| %> -[<%= hostname %>] +[SPB_<%= node['environment'] %>;<%= hostname %>] address <%= ip %> <% end %> diff --git a/monitoring/Rakefile b/monitoring/Rakefile index 6cee833..a20de46 100644 --- a/monitoring/Rakefile +++ b/monitoring/Rakefile @@ -11,5 +11,6 @@ require 'chake' ips = YAML.load_file('config/prod/ips.yaml') $nodes.each do |node| + node.data['environment'] = 'prod' node.data['peers'] = ips end -- libgit2 0.21.2