Re: [Puppet Users] Depending on a class from a class?

Daniel Piddock
2010-12-01T15:22:02Z

On 01/12/10 15:03, Nigel Kersten wrote:
> On Wed, Dec 1, 2010 at 4:18 AM, Daniel Piddock
> <dgp-goog@corefiling.co.uk> wrote:
>>  On 01/12/10 09:57, Daniel Piddock wrote:
>>>  On 30/11/10 18:07, Eric Sorenson wrote:
>>>> Minimally in your current code change ''include
repositories::debian'' to
''require("repositories::debian")'' - this is a
built-in function that does an include-plus-require and will produce the
ordering you want  (Thanks to Jeff Mccune for pointing me at this)
http://docs.puppetlabs.com/references/latest/function.html#require
>>> require was the function I was looking for. So obvious and
documented.
>> It appears that I was a little too early in my celebration.
>>
>> "require $class" causes you to import the class, however no
dependency
>> is then placed on the *contents* of said class. I''m in exactly
the same
>> position. If I have "require => Class[repository::fedora]"
instead of
>> just "require => Class[repository]" in the Package
definition I get the
>> results desired. This strikes me as a design flaw.
> It sounds like you don''t have a relationship defined between
> Class[repository] and Class[repository::fedora] ?

class repository contains a "require repository::fedora" line (context
has been lost from the first mail)

> Setting up a relationship with the former does not imply a
> relationship with the latter.

I''ve tracked it down to being a problem with 0.25.5. Using 2.6.3 the
require gets expanded correctly. Either solution I need to upgrade to 2.6.3.

I was previously calling puppetd which is not maintained by the 2.6.3
gem, so I was not actually testing 2.6.3. "puppet agent --test --noop"
works.

I now have large expanded_relationships graph with yum repos at the top
and a long line of Packages below.