From: Stephen Gran Date: Sun, 7 Mar 2010 20:24:16 +0000 (+0000) Subject: handle lack of v6 addresses nicely X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=7ccfad99d929b3aa18be9f61bde472f4570ca1e0;p=mirror%2Fdsa-puppet.git handle lack of v6 addresses nicely Signed-off-by: Stephen Gran --- diff --git a/facts/ipaddresses.rb b/facts/ipaddresses.rb index a80fa6be3..17dbd84ae 100644 --- a/facts/ipaddresses.rb +++ b/facts/ipaddresses.rb @@ -23,8 +23,12 @@ Facter.add("v6ips") do addrs << $1 end end + ret = addrs.join(",") + if ret.empty? + ret = 'no' + end setcode do - addrs.join(",") + ret end end