Yep, write it out as such :)  Either if/then in the manifest, or write a custom 
function that iterates through all ipaddress facts.

On Nov 21, 2013, at 4:32 AM, cko <dert...@gmail.com> wrote:
> I'm currently trying to solve the following problem:
> 
> I wrote a module that matches the "$ipaddress" fact for certain IP subnets 
> (like 20.20.2... or 30.30.2..). Depending on the subnet, the variable 
> $proxy-server changes.
> 
> The problem is, that some of our physical machines have a random number of 
> interfaces connected to many different subnets. In some cases the $ipadddress 
> fact returns the correct subnet, lets call it "production server lan" and 
> some don't.
> 
> Is there any way to make puppet check every available NIC for a specific 
> subnet/ regex? Something like this:
> 
> if $ipaddress_eth* =~ /^20\.20\.\..*$/ {
>    $proxy-server = foo 
> }
> . 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/9e5f1c49-cf71-4eab-a11b-18a9d31b5b0a%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.

Author of Instant Puppet 3 Starter: 
http://www.netconsonance.com/instant-puppet-3-starter-book/



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7B5FCEB5-C6F4-46D2-A928-12D717276683%40netconsonance.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to