On 11/30/2012 09:01 PM, Jakov Sosic wrote:
On 11/26/2012 07:59 PM, jcbollinger wrote:

     Trying to figure out if these would behave the same or not?

     Example 1:
     -----------------

     class Foo {
       require Bar

     Example 2:
     ----------------

     class Foo {
       include Bar
     So will these behave the same?

Yes.

So include and require do pretty much the same?


http://docs.puppetlabs.com/references/stable/function.html#include and http://docs.puppetlabs.com/references/stable/function.html#require

Thy both includes the class, but require adds a dependency to the included class.
from the docs :
This function is a superset of the ‘include’ function, adding a class relationship so that the requiring class depends on the required class.
Grts

Johan

--
Johan De Wit

Open Source Consultant
Red Hat Certified Engineer    (805008667232363)
Puppet Certified Professional 2013 (PCP0000006)
_________________________________________________________

Open-Future           Phone   +32 (0)2/255 70 70
Zavelstraat 72        Fax     +32 (0)2/255 70 71
3071 KORTENBERG       Mobile  +32 (0)474/42 40 73
BELGIUM               http://www.open-future.be
_________________________________________________________

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

Reply via email to