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