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.
puppet
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.
Best Answer
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