You could do IP: <%= scope.to_hash.inject([]) { |acc, (k,v)| acc << v if k =~ /^ipaddress_/; acc }.join(', ') %>
Regards, On Sun, Feb 12, 2012 at 07:01:01PM -0800, Will S. G. wrote: > Hi, > > I have a motd module (not mine) that rewrites /etc/motd with some > useful host details. One particular piece of information is the IP > address in motd.erb: > > FQDN: <%= fqdn %> > IP: <%= ipaddress %> > > I have several hosts that have multiple IP addresses, and I need to > display them as well. When I run facter | grep ipaddress, I get an > array: > > ipaddress => 172.26.20.16 > ipaddress_eth0 => 172.26.20.16 > ipaddress_eth1 => 10.20.30.5 > ipaddress_eth2 => 10.20.40.5 > ipaddress_eth3 => 10.20.50.5 > ipaddress_eth4 => 10.20.60.5 > ipaddress_eth5 => 10.20.70.5 > > Is there a way to display eth{0-5} as well? > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- Torbjörn Norinder Campanja AB Kammakargatan 9A 11140 Stockholm Map: http://ow.ly/NUlS www.campanja.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.