From 40baebab95eaa53aaece6c9b8aec4fcd855b3927 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Thu, 23 May 2013 14:37:54 -0300 Subject: [PATCH] Only include database recipe if databases are defined Check on a empty array condition always return truthy results. Evaluate if list of databases are empty instead. --- recipes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/default.rb b/recipes/default.rb index 23fde50..e384bdf 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -4,10 +4,10 @@ # # -if node["databox"]["databases"]["mysql"] +if node["databox"]["databases"]["mysql"].any? include_recipe "databox::mysql" end -if node["databox"]["databases"]["postgresql"] +if node["databox"]["databases"]["postgresql"].any? include_recipe "databox::postgresql" end