From 65bc614698e8d18153dc843cfd352da23af0aba2 Mon Sep 17 00:00:00 2001 From: Craig Marsden Date: Thu, 2 Jul 2015 15:59:09 +0100 Subject: [PATCH] use node array to refer to variables --- recipes/service.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/service.rb b/recipes/service.rb index 6c1e3830..56bda013 100644 --- a/recipes/service.rb +++ b/recipes/service.rb @@ -180,13 +180,13 @@ end # Atlas integration -if node.consul.atlas_autojoin or node.consul.atlas_token - cluster = node.consul.atlas_cluster - token = node.consul.atlas_token +if node['consul']['atlas_autojoin'] or node['consul']['atlas_token'] + cluster = node['consul']['atlas_cluster'] + token = node['consul']['atlas_token'] raise "atlas_cluster is empty or nil" if cluster.empty? or cluster.nil? raise "atlas_token is empty or nil" if token.empty? or token.nil? service_config['atlas_infrastructure'] = cluster - service_config['atlas_join'] = node.consul.atlas_autojoin + service_config['atlas_join'] = node['consul']['atlas_autojoin'] service_config['atlas_token'] = token end