Commit c5d196c82875696235d179405502a96525125829
1 parent
6efc3d6a
Exists in
master
and in
17 other branches
Allow template_symlink to send two notifications
We might want to refactor this.
Showing
2 changed files
with
6 additions
and
5 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/definitions/template_symlink.rb
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | # limitations under the License. | 15 | # limitations under the License. |
16 | # | 16 | # |
17 | 17 | ||
18 | -define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :group => nil, :mode => nil, :variables => nil, :notifies => nil do | 18 | +define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :group => nil, :mode => nil, :variables => nil, :notifies => nil, :notifies2 => nil do |
19 | template params[:name] do | 19 | template params[:name] do |
20 | source params[:source] | 20 | source params[:source] |
21 | owner params[:owner] | 21 | owner params[:owner] |
@@ -23,6 +23,7 @@ define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :gro | @@ -23,6 +23,7 @@ define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :gro | ||
23 | mode params[:mode] | 23 | mode params[:mode] |
24 | variables params[:variables] | 24 | variables params[:variables] |
25 | notifies *params[:notifies] if params[:notifies] | 25 | notifies *params[:notifies] if params[:notifies] |
26 | + notifies *params[:notifies2] if params[:notifies2] | ||
26 | end | 27 | end |
27 | 28 | ||
28 | link params[:link_from] do | 29 | link params[:link_from] do |
files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
@@ -49,7 +49,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "secret") do | @@ -49,7 +49,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "secret") do | ||
49 | group "root" | 49 | group "root" |
50 | mode "0644" | 50 | mode "0644" |
51 | notifies :restart, 'service[unicorn]' if should_notify_unicorn | 51 | notifies :restart, 'service[unicorn]' if should_notify_unicorn |
52 | - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq | 52 | + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq |
53 | end | 53 | end |
54 | 54 | ||
55 | template_symlink File.join(gitlab_rails_etc_dir, "database.yml") do | 55 | 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 | @@ -60,7 +60,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "database.yml") do | ||
60 | mode "0644" | 60 | mode "0644" |
61 | variables(node['gitlab']['postgresql'].to_hash) | 61 | variables(node['gitlab']['postgresql'].to_hash) |
62 | notifies :restart, 'service[unicorn]' if should_notify_unicorn | 62 | notifies :restart, 'service[unicorn]' if should_notify_unicorn |
63 | - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq | 63 | + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq |
64 | end | 64 | end |
65 | 65 | ||
66 | template_symlink File.join(gitlab_rails_etc_dir, "gitlab.yml") do | 66 | 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 | @@ -71,7 +71,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "gitlab.yml") do | ||
71 | mode "0644" | 71 | mode "0644" |
72 | variables(node['gitlab']['gitlab-rails'].to_hash) | 72 | variables(node['gitlab']['gitlab-rails'].to_hash) |
73 | notifies :restart, 'service[unicorn]' if should_notify_unicorn | 73 | notifies :restart, 'service[unicorn]' if should_notify_unicorn |
74 | - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq | 74 | + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq |
75 | end | 75 | end |
76 | 76 | ||
77 | template_symlink File.join(gitlab_rails_etc_dir, "rack_attack.rb") do | 77 | 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 | @@ -82,7 +82,7 @@ template_symlink File.join(gitlab_rails_etc_dir, "rack_attack.rb") do | ||
82 | mode "0644" | 82 | mode "0644" |
83 | variables(node['gitlab']['gitlab-rails'].to_hash) | 83 | variables(node['gitlab']['gitlab-rails'].to_hash) |
84 | notifies :restart, 'service[unicorn]' if should_notify_unicorn | 84 | notifies :restart, 'service[unicorn]' if should_notify_unicorn |
85 | - notifies :restart, 'service[sidekiq]' if should_notify_sidekiq | 85 | + notifies2 :restart, 'service[sidekiq]' if should_notify_sidekiq |
86 | end | 86 | end |
87 | 87 | ||
88 | directory node['gitlab']['gitlab-rails']['satellites_path'] do | 88 | directory node['gitlab']['gitlab-rails']['satellites_path'] do |