On 26/01/12 00:55, Trevor Vaughan wrote:
> I mentioned in a previous thread that I don't see an issue with having 
> multiple identical resources compiled across the code base and I'd like to add
> that to this thread since it's related.
> 
> class a {
>   package { 'foo': ensure => 'present' }
> }
> 
> class b {
>   package { 'foo': ensure => 'present' }
> }
> 
> include 'a'
> include 'b'
> 
> Should work. However, if the two resources differ, this should be a compile 
> error. In a perfect world, you wouldn't have this issue, but it shouldn't
> be an error since you're applying identical code.

I think this is a small improvement, but it is still forcing strong coupling -
two parts of the manifest have to know about each other and agree on how things
are defined.  It means writing self-contained manifests will still be hard or
impossible, unless *everyone* adopts the (arbitrary) convention of defining only
"ensure => present" or somesuch.

For example, suppose in one place I need a file to exist, and in another I also
need it to be executable.  Oh dear, I can't do that.

N

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to