Le 12 mars 2013 à 12:24, Gergo Erdosi <
ge...@timble.net> a écrit :
> Hi David,
>
> Nice, didn't know I can use multiple packages inside Package. Thanks!
>
> Gergo Erdosi
>
> On Tue, Mar 12, 2013 at 12:19 PM, David Schmitt <
da...@dasz.at> wrote:
>> On 12.03.2013 11:45,
ge...@timble.net wrote:
>>>
>>> Hi,
>>>
>>> I have an Exec which requires a lot of packages (15-20):
>>>
>>> Exec { 'name':
>>> ...
>>> require => [ Package['first'], Package['second'], Package['third'], ...
>>> ]
>>> }
>>>
>>> Is there a way to shorten this list and make it easier to read?
>>
>>
>> You can use
>>
>> require => Package['first', 'second', 'third', ...]
>>
>> instead.
>>
>> Also, putting this into a variable and using that instead, may improve your
>> situation:
>>
>> $packages = ['first', 'second', 'third', ...]
>>
>> package { $packages: ensure installed }
>>
>> exec { "foo": require => Package[$packages] }
>>
>> Best Regards, David
Less object, so a smaller catalog, and faster because your package tool is run once, not one time for each package.