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
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
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
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