<snip>

It is incorrect to make that relationship declaration (via the chain
> operator) if there are any nodes that do not declare the specified anchor,
> because top-level declarations in *any* manifest file apply to all
> nodes.  It is poor practice to make declarations at top level like that
> other than class and defined-type definitions, however, except sometimes in
> site.pp and manifests 'import'ed by it.  When they appear in other places,
> Puppet may or may not see them during any given catalog run, but you must
> not assume that Puppet will fail to see them under any given circumstances.
>

I absolutely agree. I was not recommending this as something to do, merely
stating that I've seen the exhibited behavior in that circumstance.



>
> Thus, manifest files that are intended to be autoloaded should contain
> exactly one thing at top-level: the definition of the class or defined type
> that is the autoloading target.
>
>
> On the other hand, I would be surprised if a top-level dependency
> declaration caused a referenced class to be declared when it otherwise was
> not declared.  That's not an issue in the example because a declaration of
> the class involved occurs in the same manifest, at the same level as the
> chain, so the class (but not necessarily the anchor) will always be
> declared if the relationship is declared.  That could point to the actual
> problem, though: there may somewhere be just such a top-level declaration
> of class 'base::firewall'.  Otherwise, it must be that class 'monitoring'
> declares class 'base::firewall', either directly or indirectly.
>

I have actually seen an error arise on a node with the cause being an
ordering declaration occurring in a non-included class file, but outside
the scope of that class. I suspect it may be a bug, however I've only
encountered it while utilizing this antipattern.


>
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/puppet-users.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to