[Puppet Users] Re: dependencies

christian
Tue, 09 Mar 2010 14:26:10 -0000

I am using "require" for this problem...like in this case:

file { "/usr/local/bb19c":
                recurse => true,
                source  =>
"puppet://$server/modules/$module/bb19c",
                owner   => "bb",
                group   => "bin",
                ensure  => directory,
                require => [ Class["general::groups"],
Class["general::users"]],
        }
This is an excerpt of my "BigBrother.pp" which defines a class for the
module "general".

The user bb and group bin are only available if the classes
general::groups and general::user are run first.
Without "require" or "before" puppet seems to run more or
less
randomly through the manifests.

I hope I got your problem right ;)

christian

On 9 Mrz., 14:26, Christopher Johnston <chjoh...@gmail.com>
wrote:
> I am noticing sometimes I have to do 2 puppet runs to get all dependencies
> to fully satisfy and for my system to configure itself at boot time.  Most
> of my environment is completely stateless so its important that everything
> gets configured at runtime (I am currently doing puppet --test at boot up
2x
> now).
>
> For example I have a yum module that sets yum configs up, but obviously I
> have other modules that depend on the installation of that yum module in
> order to use it to install rpms.  How do some people deal with ordering of
> modules to make sure things get run first and foremost?  I have read in
> previous threads of people have dependency issues and I am curious on
> potential solutions to get around it or to properly architect puppet to
"do
> the right thing".
>
> -Chris