Re: [Puppet Users] Enumerating Puppet Arrays

2014-04-03 Thread jcbollinger
On Wednesday, April 2, 2014 6:21:55 PM UTC-5, Ellison Marks wrote: > > Potentially easier, you could use prefix($scripts, '/path/'), which comes > from puppetlabs-stdlib to put the path on all members of the array. Then > just pass the now prefixed array to the defined type described above. Thi

Re: [Puppet Users] Enumerating Puppet Arrays

2014-04-02 Thread Ellison Marks
Potentially easier, you could use prefix($scripts, '/path/'), which comes from puppetlabs-stdlib to put the path on all members of the array. Then just pass the now prefixed array to the defined type described above. This avoids storing the script names externally, which may or may not be desir

Re: [Puppet Users] Enumerating Puppet Arrays

2014-04-02 Thread Christopher Wood
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

[Puppet Users] Enumerating Puppet Arrays

2014-04-02 Thread Joaquin Menchaca
Is there a way to do something like this: class make_it_so { $scripts = ["a.rb", "b.rb"] cron { $scripts: command => "/path/$scripts", user=> 'deploy', hour=> '*/4', minute => '0', } } The attribute usage of the array will just take the entire arra