FAQ
Hi all,

I'm stuck in the hell of class dependencies and hope that someone here
can help me.

Puppet-Version is 2.7.21
It's the Debian Squeeze package from the Puppetlabs Repo.

I want one class to manage everything database related. So I call it in
"site.pp" like this:

   node client1 {
     class { 'database': }
   }

It's parameterized and uses default values. The class "database"
declares(executes) other classes.

Now to my problem. I have a "sub"-class "database::packages" which must
be executed before every other stuff inside the database class. Here is
the code:

1 class database {
2 class { 'database::packages': } ->
3 # setup data dirs
4 class { 'database::directories':
5 # require => Class['database::packages'],
6 }
7 # Class['database::packages'] -> Class['database::directories']
8 }

I tried three different things. None of them worked. First one is the
chaining arrow in line 2. The next two tries I left commented out. In
line 5 I tried to require the "packages" class inside the "directories"
class declaration. And last in line 7 I tried the chaining again.

Whenever I run this code on a client, the "directories" class gets
executed first and fails, because it needs a specific user which is
setup in the "packages" class.

BTW: I also tried to put the code from line 7 inside the "sub"-classes.

Thanks for any help.

Cheers, Shorty


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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 6 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 24, '13 at 11:37a
activeMay 28, '13 at 1:06p
posts6
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase