Use include for base neutron profile
authorDan Prince <dprince@redhat.com>
Fri, 8 Jul 2016 13:07:27 +0000 (09:07 -0400)
committerDan Prince <dprince@redhat.com>
Fri, 8 Jul 2016 13:07:27 +0000 (09:07 -0400)
Simplify the base neutron profile so that we always include
the neutron and neutron::config classes at step 3. In doing so
we can now simplify the pacemaker version to use a simple include
which will avoid duplicate class errors.

Change-Id: I95b9188607ab6c599ad4cde6faa1deb081618f3e

manifests/profile/base/neutron.pp
manifests/profile/pacemaker/neutron.pp

index d5efa81..1ee2d90 100644 (file)
 #
 # === Parameters
 #
-# [*sync_db*]
-#   (Optional) Whether to run db sync
-#   Defaults to true
-#
 # [*step*]
 #   (Optional) The current step of the deployment
 #   Defaults to hiera('step')
 #
 class tripleo::profile::base::neutron (
-  $sync_db = true,
   $step    = hiera('step'),
 ) {
-  if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
+  if hiera('step') >= 3 {
     include ::neutron
     include ::neutron::config
   }
index fff731d..75a75b3 100644 (file)
@@ -61,9 +61,7 @@ class tripleo::profile::pacemaker::neutron (
     stop       => '/bin/true',
   }
 
-  class { '::tripleo::profile::base::neutron':
-    sync_db => ($::hostname == downcase($pacemaker_master)),
-  }
+  include ::tripleo::profile::base::neutron
 
   if $step >= 4 {
     include ::neutron::params