Le 12 mars 2013 à 17:46, jcbollinger <john.bollin...@stjude.org> a écrit :

> 
> This works too : 
> 
> package{'needed for exec': 
>   name => $packages, 
>   ensure => present, 
> } 
> 
> exec { "foo": require => Package['needed for exec'] } 
> 
> Less object, so a smaller catalog, and faster because your package tool is 
> run once, not one time for each package.
> 
> 
> I have trouble believing that that works completely, and if it does, I would 
> be amazed to find that it avoids running the package tool separately for each 
> package.
> 
> Ways I imagine it might fail include:
> Puppet attempts to manage a single package whose name is a concatenation of 
> the names in $packages ("firstsecondthird...")
> Puppet manages only the first package listed in $packages, ignoring the others
> Puppet does not correctly detect when the packages are already installed, and 
> therefore attempts to install them on every run
> If it does none of those things then I have great difficulty believing that 
> it does not create a separate Package resource for each element of $packages, 
> and therefore indeed run the package manager once for each.

It does nothing of that, I use it a lot in my modules and it solves many 
problems. I didn't test it on many platform, but it works quite well on 
rpm-based providers.

> 
> And if it in fact behaves exactly as promised, then that constitutes 
> undocumented behavior, and it is therefore unsafe to rely upon.

It not so undocumented. You don't just convert a array to a string, you get an 
empty separator ['a', 'b'] is converted to 'ab', for what I saw in many of my 
mistakes. So someone was thinking about my use case and add the code to have a 
' ' separator for the rpm command.

> 
> So don't do that.
> 
> 
> John

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
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