Skip to content

Commit

Permalink
use node array to refer to variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jedineeper committed Jul 5, 2015
1 parent 034e33c commit 65bc614
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recipes/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 65bc614

Please sign in to comment.