From e388359f6e6fa7547bbdd1dbb5055dc20fa22cf7 Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 13 Mar 2014 14:29:12 +0100 Subject: [PATCH] Only load crm-initial.conf when the file got changed There is no point in loading it if it's the same as before, since we already imported these settings. We load it immediately because we know that corosync is running already, and it's a critical file that we do not want to fail loading because of a later crash in chef-client. --- recipes/setup.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/setup.rb b/recipes/setup.rb index d56b2d6..5f644a1 100644 --- a/recipes/setup.rb +++ b/recipes/setup.rb @@ -19,6 +19,7 @@ # crm_conf = node[:pacemaker][:crm][:initial_config_file] + template crm_conf do source "crm-initial.conf.erb" owner "root" @@ -29,4 +30,6 @@ end execute "crm initial configuration" do user "root" command "crm configure load replace #{crm_conf}" + subscribes :run, resources(:template => crm_conf), :immediately + action :nothing end