Skip to content
Snippets Groups Projects
Commit c5d196c8 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Allow template_symlink to send two notifications

We might want to refactor this.
parent 6efc3d6a
No related branches found
No related tags found
1 merge request!47Template Symlink Notifications
Loading
Loading
@@ -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]
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment