FAQ
Something that I have been confused about for a while.

If I have:

/etc/puppet/modules/foo/manifests/bar.pp:
class foo::bar {
File {
backup => false
}
}

/etc/puppet/manifests/site.pp:
File { backup => true }

.... which one takes precedence in this situation? What about when an
include or an inherit is used instead?

Doug.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Calvin Walton at Aug 4, 2012 at 2:26 pm

    On Fri, 2012-08-03 at 22:43 -0700, Douglas Garstang wrote:
    Something that I have been confused about for a while.

    If I have:

    /etc/puppet/modules/foo/manifests/bar.pp:
    class foo::bar {
    File {
    backup => false
    }
    }

    /etc/puppet/manifests/site.pp:
    File { backup => true }

    .... which one takes precedence in this situation? What about when an
    include or an inherit is used instead?
    The puppet style guide:
    http://docs.puppetlabs.com/guides/style_guide.html#resource-defaults
    has a few words on this. As it turns out, the defaults follow dynamic
    scope.

    The end result will be that if a file {} resource is defined in class
    foo:bar you'll get the defaults from foo:bar, and if a file {} resource
    is declared outside of class foo:bar you'll get the defaults from the
    top level.

    It gets really complicated if you set resource defaults in a class, then
    include another class from in that one; so don't do that.

    --
    Calvin Walton <calvin.walton@kepstin.ca>

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedAug 4, '12 at 5:43a
activeAug 4, '12 at 2:26p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Douglas Garstang: 1 post Calvin Walton: 1 post

People

Translate

site design / logo © 2022 Grokbase