I have a level of dependency in the order of modules being applied:
class build() {
# define order
Class['base'] -> Class['config'] -> Class['app'] -> Class['sso']
class { 'base' : ... }
class { 'config' : ... }
# etc
}
class base::init.pp () {
class { 'base::prereqs' : ... }
class { 'base::worker' :
require => Class['base::prereqs']
...
}
}
# etc etc
The error occurs when base::prereqs
has:
define base::prereqs::file () { ... }
class base::prereqs () {
$files = [ 'file_name', ... ]
base::prereqs::file { $files : }
}
The desired order is base::init --> base::prereqs --> base::worker --> config::init --> config::prepreqs --> config::worker --> app::init ...
However the actual order using a define becomes...
base::init --> base::prereqs (except resources created in the define) --> config::init --> config::prereqs --> ... --> base:prepreqs (resources created by define) --> base::worker
The ordering inside base
is consistent but the level above in order
does not seem to know that resources have been added inside of prereqs
and considers base
complete.
Any help?
Puppet v3.6.2 (Puppet Enterprise 3.3.2)