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, Markus
signature.asc
Description: OpenPGP digital signature