From c5d196c82875696235d179405502a96525125829 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 14 Feb 2014 18:47:15 +0100 Subject: [PATCH] Allow template_symlink to send two notifications --- files/gitlab-cookbooks/gitlab/definitions/template_symlink.rb | 3 ++- files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/files/gitlab-cookbooks/gitlab/definitions/template_symlink.rb b/files/gitlab-cookbooks/gitlab/definitions/template_symlink.rb index 4788bfb..9764f80 100644 --- a/files/gitlab-cookbooks/gitlab/definitions/template_symlink.rb +++ b/files/gitlab-cookbooks/gitlab/definitions/template_symlink.rb @@ -15,7 +15,7 @@ # limitations under the License. # -define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :group => nil, :mode => nil, :variables => nil, :notifies => nil do +define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :group => nil, :mode => nil, :variables => nil, :notifies => nil, :notifies2 => nil do template params[:name] do source params[:source] owner params[:owner] @@ -23,6 +23,7 @@ define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :gro mode params[:mode] variables params[:variables] notifies *params[:notifies] if params[:notifies] + notifies *params[:notifies2] if params[:notifies2] end link params[:link_from] do diff --git a/files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb b/files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb index 716c84c..765819d 100644 --- a/files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb +++ b/files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb @@ -49,7 +49,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "secret") do group "root" mode "0644" notifies :restart, 'service[unicorn]' if should_notify_unicorn - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq end template_symlink File.join(gitlab_rails_etc_dir, "database.yml") do @@ -60,7 +60,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "database.yml") do mode "0644" variables(node['gitlab']['postgresql'].to_hash) notifies :restart, 'service[unicorn]' if should_notify_unicorn - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq end template_symlink File.join(gitlab_rails_etc_dir, "gitlab.yml") do @@ -71,7 +71,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "gitlab.yml") do mode "0644" variables(node['gitlab']['gitlab-rails'].to_hash) notifies :restart, 'service[unicorn]' if should_notify_unicorn - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq end template_symlink File.join(gitlab_rails_etc_dir, "rack_attack.rb") do @@ -82,7 +82,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "rack_attack.rb") do mode "0644" variables(node['gitlab']['gitlab-rails'].to_hash) notifies :restart, 'service[unicorn]' if should_notify_unicorn - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq end directory node['gitlab']['gitlab-rails']['satellites_path'] do -- libgit2 0.21.2