summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2019-03-05 14:50:38 -0800
committerClark Boylan <clark.boylan@gmail.com>2019-03-05 14:51:37 -0800
commit41a3cc927de32e099fcc3e00f7879749297f1be3 (patch)
treee39bafecfa06a059048a5182ebf194b6acd3d02f
parent3ebe44d16fbc48ae1c8f2a40bcd95f06aac65616 (diff)
Check if project_config_ref is defined before using itHEADmaster
This checks if the $::project_config_ref fact is defined before accessing it. Puppet 4 seems to care about his more than puppet 3 so we are only just notcing this now. Note that this fix relies on puppet boolean operator 'and' short circuiting which I'm not entirely sure if it does yet. Change-Id: I2b89ac146609f9c3b22c05814b85c646f74b393a
Notes
Notes (review): Code-Review+2: Colleen Murphy <colleen@gazlene.net> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 06 Mar 2019 19:34:51 +0000 Reviewed-on: https://review.openstack.org/641152 Project: openstack-infra/puppet-project_config Branch: refs/heads/master
-rw-r--r--manifests/init.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index e81c163..0323049 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -24,7 +24,7 @@ class project_config(
24 $config_dir = Vcsrepo['/etc/project-config'] 24 $config_dir = Vcsrepo['/etc/project-config']
25 25
26 # Note project_config_ref can be provided by facter if you want to use it. 26 # Note project_config_ref can be provided by facter if you want to use it.
27 if ($::project_config_ref != undef) { 27 if (defined('$::project_config_ref') and $::project_config_ref != undef) {
28 $_revision = $::project_config_ref 28 $_revision = $::project_config_ref
29 } 29 }
30 else { 30 else {