diff options
author | Steve Baker <sbaker@redhat.com> | 2017-05-22 10:40:14 +1200 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2017-06-14 14:31:52 +1200 |
commit | 94f13e66089cc0b18d5b4b2f6e204160d836ac3e (patch) | |
tree | 2974f79a71d44705c1791b258afe9b3250667bb5 /manifests/profile/base/database | |
parent | 2561fa9560e80e6f6cf9c6c1f1424491cfb012d9 (diff) |
Ensure hiera step value is an integer
The step is typically set with the hieradata setting an integer value:
{"step": 1}
However it would be useful for the value to be a string so that
substitutions are possible, for example:
{"step": "%{::step}"}
This change ensures the step parameter defaults to an integer by
calling Integer(hiera('step'))
This change was made by manually removing the undef defaults from
fluentd.pp, uchiwa.pp, and sensu.pp then bulk updating with:
find ./ -type f -print0 |xargs -0 sed -i "s/= hiera('step')/= Integer(hiera('step'))/"
Change-Id: I8a47ca53a7dea8391103abcb8960a97036a6f5b3
Diffstat (limited to 'manifests/profile/base/database')
-rw-r--r-- | manifests/profile/base/database/mongodb.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/database/mysql.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/database/mysql/client.pp | 2 | ||||
-rw-r--r-- | manifests/profile/base/database/redis.pp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/manifests/profile/base/database/mongodb.pp b/manifests/profile/base/database/mongodb.pp index 4740d67..48bdd82 100644 --- a/manifests/profile/base/database/mongodb.pp +++ b/manifests/profile/base/database/mongodb.pp @@ -37,7 +37,7 @@ class tripleo::profile::base::database::mongodb ( $mongodb_replset, $bootstrap_node = downcase(hiera('bootstrap_nodeid')), - $step = hiera('step'), + $step = Integer(hiera('step')), $memory_limit = '20G', ) { if $step >= 2 { diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp index 2dac028..8eb6079 100644 --- a/manifests/profile/base/database/mysql.pp +++ b/manifests/profile/base/database/mysql.pp @@ -80,7 +80,7 @@ class tripleo::profile::base::database::mysql ( $mysql_server_options = {}, $mysql_max_connections = hiera('mysql_max_connections', undef), $remove_default_accounts = true, - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $::hostname == downcase($bootstrap_node) { diff --git a/manifests/profile/base/database/mysql/client.pp b/manifests/profile/base/database/mysql/client.pp index 3de1e97..1e55f05 100644 --- a/manifests/profile/base/database/mysql/client.pp +++ b/manifests/profile/base/database/mysql/client.pp @@ -50,7 +50,7 @@ class tripleo::profile::base::database::mysql::client ( $mysql_read_default_group = 'tripleo', $mysql_client_bind_address = undef, $ssl_ca = '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt', - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $step >= 1 { # If the folder /etc/my.cnf.d does not exist (e.g. if mariadb is not diff --git a/manifests/profile/base/database/redis.pp b/manifests/profile/base/database/redis.pp index 14f6af4..830ffc6 100644 --- a/manifests/profile/base/database/redis.pp +++ b/manifests/profile/base/database/redis.pp @@ -34,7 +34,7 @@ class tripleo::profile::base::database::redis ( $bootstrap_nodeid = hiera('bootstrap_nodeid'), $redis_node_ips = hiera('redis_node_ips'), - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $step >= 2 { if $bootstrap_nodeid == $::hostname { |