Skip to content

Commit

Permalink
Merge pull request #38 from Sheile/fix-resource-order
Browse files Browse the repository at this point in the history
Fix resource order to suppress error when service start before create default.json.
  • Loading branch information
John Bellone committed Sep 3, 2014
2 parents c37fe9d + fea266d commit 76e5e7e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@

consul_config_filename = File.join(node['consul']['config_dir'], 'default.json')

file consul_config_filename do
user consul_user
group consul_group
mode 0600
action :create
content JSON.pretty_generate(service_config, quirks_mode: true)
end

case node['consul']['init_style']
when 'init'
template '/etc/init.d/consul' do
Expand Down Expand Up @@ -140,11 +148,3 @@
)
end
end

file consul_config_filename do
user consul_user
group consul_group
mode 0600
action :create
content JSON.pretty_generate(service_config, quirks_mode: true)
end

0 comments on commit 76e5e7e

Please sign in to comment.