summaryrefslogtreecommitdiffstats
path: root/manifests/profile
diff options
context:
space:
mode:
authorEmilien Macchi <emilien@redhat.com>2016-07-21 09:50:56 -0400
committerEmilien Macchi <emilien@redhat.com>2016-07-22 09:02:13 -0400
commit95b432e9bc6295ed9f544db6077143c2f0660165 (patch)
tree38ebbc444634965054ba4dff3919690ba1ecfea9 /manifests/profile
parent964526ba48fb8135f283dcd29d0c8a1ae3bec364 (diff)
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
Diffstat (limited to 'manifests/profile')
-rw-r--r--manifests/profile/base/database/mysql.pp2
-rw-r--r--manifests/profile/base/heat.pp2
-rw-r--r--manifests/profile/base/pacemaker.pp6
-rw-r--r--manifests/profile/pacemaker/database/mysql.pp6
4 files changed, 8 insertions, 8 deletions
diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp
index 9552e10..27df6e4 100644
--- a/manifests/profile/base/database/mysql.pp
+++ b/manifests/profile/base/database/mysql.pp
@@ -52,7 +52,7 @@ class tripleo::profile::base::database::mysql (
# ha scenario
$mysql_step = 1
}
- if hiera('step') >= $mysql_step {
+ if $step >= $mysql_step {
if str2bool(hiera('enable_galera', true)) {
$mysql_config_file = '/etc/my.cnf.d/galera.cnf'
} else {
diff --git a/manifests/profile/base/heat.pp b/manifests/profile/base/heat.pp
index fa0e2f1..1311f20 100644
--- a/manifests/profile/base/heat.pp
+++ b/manifests/profile/base/heat.pp
@@ -44,7 +44,7 @@ class tripleo::profile::base::heat (
# Domain resources will be created at step5 on the pacemaker_master so we
# configure heat.conf at step3 and 4 but actually create the domain later.
- if hiera('step') == 3 or hiera('step') == 4 {
+ if $step == 3 or $step == 4 {
class { '::heat::keystone::domain':
manage_domain => false,
manage_user => false,
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index de107a9..1785656 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -38,9 +38,9 @@ class tripleo::profile::base::pacemaker (
$pacemaker_master = false
}
- $enable_fencing = str2bool(hiera('enable_fencing', false)) and hiera('step') >= 5
+ $enable_fencing = str2bool(hiera('enable_fencing', false)) and $step >= 5
- if hiera('step') >= 1 {
+ if $step >= 1 {
$pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
$corosync_ipv6 = str2bool(hiera('corosync_ipv6', false))
if $corosync_ipv6 {
@@ -78,7 +78,7 @@ class tripleo::profile::base::pacemaker (
}
}
- if hiera('step') >= 2 {
+ if $step >= 2 {
if $pacemaker_master {
include ::pacemaker::resource_defaults
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