Am 24.05.2013 16:20, schrieb jcbollinger:
>> Whenever I run this code on a client, the "directories" class gets
>> executed first
>
> As judged how?
Running "puppet apply --test" in a Client, destroying the client(it's a
Vagrant instance) and doing it again... ;)
> All of the methods you tried for declaring the needed relationship are
> valid and appear correct. I conclude that you have diagnosed the
> problem incorrectly.
How should I have diagnosed this? Would have the debug switch helped?
That did the trick. Now my code looks like this:
class database ( $serverpackage = 'mariadb' ) {
class { 'database::packages':
serverpackage => $serverpackage,
}
# setup data dirs(should change my.cnf and restart mysql!)
class { 'database::directories':
require => Class['database::packages'],
}
anchor {'db_first':} -> Class['database::packages'] -> anchor {'db_last':}
[...]
}
After a handful of testruns it seems to work. I had read the
documentation you mentioned and didn't make the connection. My mistake.
Thanks for your help John.
BTW: I joined the related bug report ;)
Cheers, Shorty