From 9d1b750d743a4060101949de41838fec61985862 Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Thu, 22 Oct 2015 14:15:13 -0700 Subject: [PATCH] fix site.pp to not include a role that is empty --- manifests/site.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/manifests/site.pp b/manifests/site.pp index 5ba0af4..7f7b8db 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -41,7 +41,10 @@ node default { #incude a role on any node that specifies it's role via a trusted fact at provision time #https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#trusted-facts #https://docs.puppetlabs.com/puppet/latest/reference/ssl_attributes_extensions.html#aws-attributes-and-extensions-population-example - include "role::${trusted['extensions']['pp_role']}" + + if !empty( ${trusted['extensions']['pp_role']} ) { + include "role::${trusted['extensions']['pp_role']}" + } # This is where you can declare classes for all nodes. # Example: