On Thu, Oct 06, 2011 at 02:38:28AM +0000, CZACHOR, KRISTOPHER wrote: > > (Pseudo code) > If 123.123.123.123 is in 123.123.123.0/24 or 234.234.234.234.0/24 > (list/array of networks it could belong to) then ensure package is present. > -or- > If 123.123.123.123 is in 123.123.123.0/255.255.255.0 then ensure package is > present.
I wrote a function a while back that might make this easier for you: https://github.com/deanwilson/puppet/blob/ip_in_range_function/lib/puppet/parser/functions/ip_in_range.rb if ( ip_in_range( '10.10.10.10', "10.0.0.0/8" ) ) { package { "example": ... } } Dean -- Dean Wilson http://www.unixdaemon.net @unixdaemon http://www.puppetcookbook.com @puppetcookbook -- 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.