diff options
Diffstat (limited to 'manifests/profile/base/ironic.pp')
-rw-r--r-- | manifests/profile/base/ironic.pp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/manifests/profile/base/ironic.pp b/manifests/profile/base/ironic.pp index 139654b..da89839 100644 --- a/manifests/profile/base/ironic.pp +++ b/manifests/profile/base/ironic.pp @@ -18,26 +18,34 @@ # # === Parameters # +# [*bootstrap_node*] +# (Optional) The hostname of the node responsible for bootstrapping tasks +# Defaults to hiera('bootstrap_nodeid') +# # [*step*] # (Optional) The current step of the deployment # Defaults to hiera('step') # -# [*sync_db*] -# (Optional) Whether to run db sync -# Defaults to true -# class tripleo::profile::base::ironic ( - $step = hiera('step'), - $sync_db = true, + $bootstrap_node = hiera('bootstrap_nodeid', undef), + $step = hiera('step'), ) { + # Database is accessed by both API and conductor, hence it's here. + if $::hostname == downcase($bootstrap_node) { + $sync_db = true + } else { + $sync_db = false + } - if $step >= 3 { - include ::ironic + if $step >= 3 and $sync_db { + include ::ironic::db::mysql + } - # Database is accessed by both API and conductor, hence it's here. - if $sync_db { - include ::ironic::db::mysql - include ::ironic::db::sync + if $step >= 4 or ($step >= 3 and $sync_db) { + class { '::ironic': + sync_db => $sync_db, } + + include ::ironic::cors } } |