Check out defined types. For a faked together example:
define make_it_so::make_one_thing_so {
cron { $title:
command => "/path/$title",
user => 'deploy',
hour => '*/4',
minute => '0',
}
}
http://docs.puppetlabs.com/learning/definedtypes.html
Then add a data structure which you will presumably retrieve from hiera:
$scripts = {
'a.rb' => {},
'b.rb' => {},
}
http://docs.puppetlabs.com/hiera/1/
Then use create_resources to make as many of these as you need, without putting arrays or hashes in your puppet code ($scripts here will be automatically looked up via hiera):
class make_it_so (
$scripts = {}
) {
create_resources('make_it_so::make_one_thing_so', $scripts)
}
http://docs.puppetlabs.com/references/latest/function.html#createresources
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [1]
puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]
https://groups.google.com/d/msgid/puppet-users/6db6cb93-e9c4-4a42-91e7-36aa7583b5e1%40googlegroups.com.
> For more options, visit [3]
https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:
puppet-users...@googlegroups.com
> 2.
https://groups.google.com/d/msgid/puppet-users/6db6cb93-e9c4-4a42-91e7-36aa7583b5e1%40googlegroups.com?utm_medium=email&utm_source=footer
> 3.
https://groups.google.com/d/optout