From 4e4a45ca6be0dfdf5e98df510e0c79189d491cfc Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 3 Dec 2012 01:54:56 +0200 Subject: [PATCH] Fixed munin::node for EC2 instances --- munin/manifests/init.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index 5c13aff..fc49631 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -61,7 +61,10 @@ class munin::node { @@file { "/etc/munin/conf.d/${homename}.conf": ensure => present, - content => "[${homename}]\n address ${ipaddress}\n use_node_name yes\n", + content => $::ec2_public_ipv4 ? { + "" => "[${homename}]\n address ${ipaddress}\n use_node_name yes\n", + default => "[${homename}]\n address ${ec2_public_ipv4}\n use_node_name yes\n", + }, tag => "munin", }