On 12 Aug., 11:17, Thomas Bellman <bell...@nsc.liu.se> wrote:
> 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

i did that now, thx for the hint,
here is my complete listing for now:

case $listenif {
                eth0: { $bindip = $ipaddress_eth0 }
                eth1: { $bindip = $ipaddress_eth1 }
                tun0: { $bindip = $ipaddress_tun0 }
                tun1: { $bindip = $ipaddress_tun1 }
                default: { notice("## no listenif parameter set for host $host.
$fqdn, using loopack interface as bindport ##") $bindip =
"127.0.0.1" }
        }
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to