From 95b432e9bc6295ed9f544db6077143c2f0660165 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Thu, 21 Jul 2016 09:50:56 -0400 Subject: use parameter to lookup the step instead of hiera again In some profiles, we were looking up the $step by using Hiera again, while we already do it in the parameter definition. When using this class outside THT, it will fail but with this patch, we could use just set the $step parameter and the rest of the manifest will work. Change-Id: I7082f47204fb4e529b164e4c4f1032e7bdd88f02 --- manifests/profile/pacemaker/database/mysql.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/profile/pacemaker') diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index 1acdf0d..80015d0 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -72,7 +72,7 @@ class tripleo::profile::pacemaker::database::mysql ( mysql_server_options => $mysqld_options, } - if hiera('step') >= 2 and $pacemaker_master { + if $step >= 2 and $pacemaker_master { if $pacemaker_master { pacemaker::resource::ocf { 'galera' : ocf_agent_name => 'heartbeat:galera', @@ -129,7 +129,7 @@ class tripleo::profile::pacemaker::database::mysql ( } } - if hiera('step') >= 4 or ( hiera('step') >= 3 and $pacemaker_master ) { + if $step >= 4 or ( $step >= 3 and $pacemaker_master ) { # At this stage we are guaranteed that the clustercheck db user exists # so we switch the resource agent to use it. $mysql_clustercheck_password = hiera('mysql_clustercheck_password') @@ -144,7 +144,7 @@ MYSQL_HOST=localhost\n", } } - if hiera('step') >= 5 { + if $step >= 5 { # We now make sure that the root db password is set to a random one # At first installation /root/.my.cnf will be empty and we connect without a root # password. On second runs or updates /root/.my.cnf will already be populated -- cgit 1.2.3-korg