Posts Tagged ‘inline_template’

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: checking if a value is present in an array

Thursday, June 17th, 2010

Although it’s going to be easier in puppet 2.6, this helps you if you want to check if a certain value is present in a puppet array and perform actions based on that.

More...

Puppet Tips&Tricks: Variable variables

Monday, February 15th, 2010

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

More...