On 11 Aug., 17:10, Chad Huneycutt <[email protected]> wrote:
> Try:
>
> $listenip = "${ipaddress}_${service_listenif}"
>
> - Chad
hey chad, thanks for your reply

your example above would give me

$listenip = "192.168.0.1_eth0"

but instead i need
$listenip = "%IP_OF_SOME_NETWORK_DEVICE%"
, where the "device" is dynamic means, it could also be eth1, or even
tun0 etc.

since i do not want to set fixed ip's in every single node definition


lets explain some more,
lets say you do have some servers on the cloud

where eth0 is the "bad and evil" network interface,
you do not want to have any of your services on this one
even thought there could be a firewall etc. but that is not the point
in here.

and tun0 ist your "good and shiny" interface, where all your company
traffic gets over a secured vpn link

how would you tell every node that it's services should just run on
lets say tun0, without "hardconding" to a module or class



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
}


eh, makes me feel a bit stupid that i haven't got the idea earlier,
anyway the best solutions come into our mind when we step back and
take a look from further away ain't they

hopefully it's working tomorrow when i try it out
--~--~---------~--~----~------------~-------~--~----~
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