Jon Stanley wrote:
> On Tue, Sep 15, 2009 at 8:30 AM, seph <s...@directionless.org> wrote:
> 
>> I'd love to not worry about realizing
>> the same user twice.
> 
> I thought that was the whole point of virtual resources, though - you
> can realize the same resource as many times as you'd like and only end
> up with one copy of it.
> 
> I'm thinking the duplicate definition error *may* be the result of
> defining the same virtual resource twice - i.e. if I somehow define it
> outside the scope of the define, and realize it however many times is
> needed, then it's all good.
> 
> Could someone with knowledge in this area correct me if I'm wrong, and
> provide a pointer to how to "define something outside a define" that's
> not a static resource?
> 

My typical pattern in that case looks like this:

class required_stuff {
        file {
                "/etc/something":
                        ...
        }
}

define something() {
        include required_stuff
        ...
}



Regards, DavidS


--~--~---------~--~----~------------~-------~--~----~
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