Don't install the trac git hook on non-trac servers
authorTom Hughes <tom@compton.nu>
Wed, 2 Oct 2013 20:45:32 +0000 (21:45 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 2 Oct 2013 20:45:32 +0000 (21:45 +0100)
cookbooks/git/recipes/server.rb

index a287c61995a9051364c4870bbae0c0fe57e81faa..f8f0ef3d4cac2b571e1d4a1b4ae1a469f8d01db4 100644 (file)
@@ -61,7 +61,7 @@ Dir.new(git_directory).select { |name| name =~ /\.git$/ }.each do |repository|
     mode 0755
   end
 
     mode 0755
   end
 
-  if repository != "dns.git"
+  if node[:recipes].include?("trace") and repository != "dns.git"
     template "#{git_directory}/#{repository}/hooks/post-receive" do
       source "post-receive.erb"
       owner "root"
     template "#{git_directory}/#{repository}/hooks/post-receive" do
       source "post-receive.erb"
       owner "root"