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

Daniel Piddock
2010-12-01T09:57:37Z

On 30/11/10 18:07, Eric Sorenson wrote:
> On Nov 30, 2010, at 7:03 AM, Daniel Piddock wrote:
>
>> Is there any way for a class to depend on another class or for the
>> include statement to act more like a require?
>
> Two things here:
>
> If you''re on 2.6.3 put your repositories class in a
''pre'' stage, that way you eliminate putting an individual
dependency on every package resource as you''re currently doing.

Unfortunately I''m still stuck in 0.25 land. Staging looks like a nicer
solution to some of my problems.

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

Thank you,