Skip to content

Commit

Permalink
Fix resource order to suppress error when service start before create…
Browse files Browse the repository at this point in the history
… default.json.
  • Loading branch information
Sheile committed Sep 2, 2014
1 parent 36f0dc5 commit fea266d
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 fea266d

Please sign in to comment.