On 12.03.2013 11:45, [email protected] 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

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to