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 | 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 | 19 | template params[:name] do |
| 20 | 20 | source params[:source] |
| 21 | 21 | owner params[:owner] |
| ... | ... | @@ -23,6 +23,7 @@ define :template_symlink, :link_from => nil, :source => nil, :owner => nil, :gro |
| 23 | 23 | mode params[:mode] |
| 24 | 24 | variables params[:variables] |
| 25 | 25 | notifies *params[:notifies] if params[:notifies] |
| 26 | + notifies *params[:notifies2] if params[:notifies2] | |
| 26 | 27 | end |
| 27 | 28 | |
| 28 | 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 | 49 | group "root" |
| 50 | 50 | mode "0644" |
| 51 | 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 | 53 | end |
| 54 | 54 | |
| 55 | 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 | 60 | mode "0644" |
| 61 | 61 | variables(node['gitlab']['postgresql'].to_hash) |
| 62 | 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 | 64 | end |
| 65 | 65 | |
| 66 | 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 | 71 | mode "0644" |
| 72 | 72 | variables(node['gitlab']['gitlab-rails'].to_hash) |
| 73 | 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 | 75 | end |
| 76 | 76 | |
| 77 | 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 | 82 | mode "0644" |
| 83 | 83 | variables(node['gitlab']['gitlab-rails'].to_hash) |
| 84 | 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 | 86 | end |
| 87 | 87 | |
| 88 | 88 | directory node['gitlab']['gitlab-rails']['satellites_path'] do | ... | ... |