I have an array of hashes like this:
$dirs => [
{name => "one", },
{name => "two", },
{name => "anotherone", },
]
Now I'm trying to use puppetlabs apache module vhost like this:
apache::vhost {"vhost name":
servername => "servername",
ip => "0.0.0.0",
port => '80',
directories => [
{path => "/static/path", provider => "location", }
]
}
But the thing is, that I need to extend the `directories` property array with the extra "dynamic" elements generated from `$dirs` where the required settings would be created based on individual `$dirs` hashes + some common defaults. For example:
{path => "/dynamic/$name", provider => "location", }
I'd say I either need to construct the directories first (including the "static" one) and just give that to apache::vhost or extend the declaration with some resource collector, but I'm not sure how to go about that in either case..
Can someone point me to proper direction?
↧