I have a variable $IP = [ "91" , "92" ]and $IPPriveeInstance = "10.248.33.$IP".
You guessed it, I want to use this variable 2 times,but when I print IPPriveeInstance, I got the output as 10.248.33.9192.
|
I have a variable You guessed it, I want to use this variable 2 times,but when I print | ||||
|
feedback
|
|
Puppet does not iterate array items. The example below demonstrates with inline_template, but you should use a custom function to perform this task.
You can also write this via the Ruby DSL: http://projects.puppetlabs.com/projects/1/wiki/Ruby_Dsl | |||
|
feedback
|
|
You're trying to reference the full array at once when you want the individual parts of the arrays separately. Try this:
The first index in an array is always zero. | |||
|
feedback
|
IPPriveeInstancevariable to one address or the other, you'll only have... one address. Give us more information on what you're trying to accomplish (populating a config file? passing those in to a module?), and we'll be able to help. – Shane Madden Apr 12 '11 at 19:46