From 94f13e66089cc0b18d5b4b2f6e204160d836ac3e Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 22 May 2017 10:40:14 +1200 Subject: 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 --- manifests/profile/base/swift/proxy.pp | 2 +- manifests/profile/base/swift/ringbuilder.pp | 2 +- manifests/profile/base/swift/storage.pp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/profile/base/swift') diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp index 4e0e568..b047c36 100644 --- a/manifests/profile/base/swift/proxy.pp +++ b/manifests/profile/base/swift/proxy.pp @@ -107,7 +107,7 @@ class tripleo::profile::base::swift::proxy ( $enable_internal_tls = hiera('enable_internal_tls', false), $memcache_port = 11211, $memcache_servers = hiera('memcached_node_ips'), - $step = hiera('step'), + $step = Integer(hiera('step')), $swift_proxy_network = hiera('swift_proxy_network', undef), $tls_proxy_bind_ip = undef, $tls_proxy_fqdn = undef, diff --git a/manifests/profile/base/swift/ringbuilder.pp b/manifests/profile/base/swift/ringbuilder.pp index 67156d4..3ab3234 100644 --- a/manifests/profile/base/swift/ringbuilder.pp +++ b/manifests/profile/base/swift/ringbuilder.pp @@ -77,7 +77,7 @@ class tripleo::profile::base::swift::ringbuilder ( $replicas, $build_ring = true, $devices = undef, - $step = hiera('step'), + $step = Integer(hiera('step')), $swift_zones = '1', $raw_disk_prefix = 'r1z1-', $raw_disks = [], diff --git a/manifests/profile/base/swift/storage.pp b/manifests/profile/base/swift/storage.pp index 5018d77..3d0ba16 100644 --- a/manifests/profile/base/swift/storage.pp +++ b/manifests/profile/base/swift/storage.pp @@ -30,7 +30,7 @@ class tripleo::profile::base::swift::storage ( # Deprecated conditional to support ControllerEnableSwiftStorage parameter $enable_swift_storage = true, - $step = hiera('step'), + $step = Integer(hiera('step')), ) { if $step >= 4 { if $enable_swift_storage { -- cgit 1.2.3-korg