Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
inet <%= ip %> <%= netmask %> <%= bcast %> vhid <%= vhid %> pass <%= pass %> advskew <%= advskew %> group <%= ifgroup %> <% if ifgroup == 'externalfw' iplist = (4..253).to_a.collect! {|i| /(\d{1,3}\.\d{1,3}\.\d{1,3}\.)\d{1,3}/.match(ip)[1] + i.to_s} elsif ifgroup == 'internalfw' iplist = aliases end -%> <% iplist.each do |a| %>inet alias <%= a %> 255.255.255.255 <% end -%> define netiface::carp ($interface, $aliases = '', $ip, $netmask = '255.255.255.0', $bcast = 'NONE', $vhid, $pass, $advskew, $ifgroup = 'default') { file { "/tmp/carp": content => template("templates/ips.erb"), } }
This paste will be private.
From the Design Piracy series on my blog: