From fea266d8712ec5b492b0f20e7110782b942caf17 Mon Sep 17 00:00:00 2001 From: Yo Takezawa Date: Tue, 2 Sep 2014 13:37:41 +0900 Subject: [PATCH] Fix resource order to suppress error when service start before create default.json. --- recipes/_service.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/_service.rb b/recipes/_service.rb index ff8d9b10..3ddb20b5 100644 --- a/recipes/_service.rb +++ b/recipes/_service.rb @@ -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 @@ -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