From 7c3f92af7e26107dd7dc98497688c8e1edaa4bf6 Mon Sep 17 00:00:00 2001 From: nonflet Date: Tue, 17 Sep 2013 14:28:50 +0300 Subject: [PATCH] Adding not_if for stopping action during updating erlang cookie It is needed ,because of every time service stopping during chef-client process, even if cluster already configured... So if we already have "good" erlang cookie, we doesn't need to stop service. Please merge it as soon , as possible! --- recipes/default.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/default.rb b/recipes/default.rb index f4861955..259f9738 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -171,6 +171,7 @@ log "stopping service[#{node['rabbitmq']['service_name']}] to change erlang_cookie" do level :info notifies :stop, "service[#{node['rabbitmq']['service_name']}]", :immediately + not_if "cat #{node['rabbitmq']['erlang_cookie_path']} | grep #{node['rabbitmq']['erlang_cookie']}" end template node['rabbitmq']['erlang_cookie_path'] do