Jan Werner wrote:

> eh. while writing the things above, i'd propably found a solution:
> node definitions says: $listenif = eth0
> 
> now the "magic" class comes to it's action and has the following code:
> case $listenif {
>  eth0: $listenip = $ipaddress_eth0
>  eth1: $listenip = $ipaddress_eth1
>  tun0: $listenip = $ipaddress_tun0
>  tun1: $listenip = $ipaddress_tun1
> }

You may want to add a default case, calling the fail() function:

     case $listenif {
         'eth0': $listenip = $ipaddress_eth0
         ...
         default: fail("Bad value for \$listenif: ``$listenif''")
     }

That way you will get a clear error message instead of just strange
behaviour when you, two years from now, happen to set $listenif to "eth7".


        /Bellman

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to