Try: $listenip = "${ipaddress}_${service_listenif}"
- Chad On Tue, Aug 11, 2009 at 6:14 AM, Jan Werner<rababerkuc...@tortenboxer.de> wrote: > > hi list, > > i'd guess the subject could cause some braindamage, i'm sorry for > that, i did not find a better description for my problem. > > here my problem. > i do have the following list of variables to work with: > > $service_listenif = "eth0" ## this is a variable that comes from the > node definition > $ipaddress_eth0 = "192.168.0.1" ## comes throught facter > > now i do want to set new variable called $listenip containing the ip > of the interface that has been specified in $service_listenif. > > how would you solve that? > since: > $listenip = $ipaddress_$service_listenif ## does not work > > i've been testing around with generate using something similar to: > $listenip = generate("/sbin/ifconfig", "$service_listenif | grep inet > | sed 's/^\s*inet addr://' | sed 's/ Bcast.*//'") > > did not work either, at least so far, it seems that generate wouldn't > let me pass multiple commands as shown above, no matter which > combination i took. > > > last but not least, if there is no chance of doing that the puppet > way, i'll write a shell script for that > accepting $service_listenif as parameter and doing the "logic" inside > the sheel script. > > would like to hear your thoughts. > > > > > -- Chad M. Huneycutt --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---