Posts Tagged ‘variables’

Puppet Tips&Tricks: Variable variables

Wednesday, September 1st, 2010

Sometimes you want to use variable variables, for instance when you want to iterate over all the ipaddress_* facts that facter found. Using something like ${ipaddress_$if} doesn’t work, though. Inline_template to the rescue! Thanks to Volcane on IRC, this is a possible solution: $ifs = split($interfaces,”,”) define do_this { $mule = “ipaddress_${name}” $donkey = inline_template(“<%= […]

More...

Puppet Tips&Tricks: Variable variables

Monday, February 15th, 2010

How to access a variable with a variable in its name from puppet.

More...