On Thursday, March 19, 2015 at 8:56:38 AM UTC-5, tan...@gmail.com wrote:
>
> I've encountered the problem where 2 modules declare the identical 
> package. 
>
> I wonder why package { .. } doesn't check if the package is already 
> declared, and the redundant declaration can be ignored.
>
> Will it be a nice improvement? If not, why not?
>
>

It has been requested before, in various forms.  The case is pretty clear 
cut where the conflicting resources have different parameters: Puppet must 
throw an error because there is no catalog that can represent the 
conflicting constraints of all the different declarations of the same 
resource.  It is not ok to just choose one, because then Puppet would not 
be enforcing some of the state specified to it.

The arguments around identical resource declarations are less clear cut, 
but they don't apply to your situation.  Your declarations are 
differentiated simply by their locations.  Every resource is automatically 
assigned a set of tags, some of which are derived from the location of its 
declaration.  These tags cannot be neglected because they can have a 
profound effect on how the catalog is applied and even on how it is built.  
Thus, identical package (or other resource) *declarations* in different 
classes do not declare identical resources.


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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/385b5ba0-f8d1-4dc5-b3eb-bbfca3be3531%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to