ruby - Puppet class orders break using defines -
i have level of dependency in 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 base::init --> base::prereqs --> base::worker --> config::init --> config::prepreqs --> config::worker --> app::init ...
however actual order using define becomes...
base::init --> base::prereqs (except resources created in define) --> config::init --> config::prereqs --> ... --> base:prepreqs (resources created define) --> base::worker
the ordering inside base
consistent level above in order
not seem know resources have been added inside of prereqs
, considers base
complete.
any help?
puppet v3.6.2 (puppet enterprise 3.3.2)
ordering relationships not transcend common class declaration using include
or class { 'title': }
.
the easiest way go in scenario contain classes.
class base { contain base::prereqs contain base::worker class['base::prereqs'] -> class['base::worker'] }
Comments
Post a Comment