From: Grant Slater Date: Tue, 4 Jun 2013 23:45:25 +0000 (+0100) Subject: Add initial robots.txt to gitweb to exclude snapshot links X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/2cc0f2ba3c1fda40b800e6299ba5f35731d21bda?ds=sidebyside Add initial robots.txt to gitweb to exclude snapshot links --- diff --git a/cookbooks/git/recipes/server.rb b/cookbooks/git/recipes/server.rb index c3382a2cf..f679ce82b 100644 --- a/cookbooks/git/recipes/server.rb +++ b/cookbooks/git/recipes/server.rb @@ -44,6 +44,13 @@ apache_site node[:git][:host] do directory git_directory end +template "#{git_directory}/robots.txt" do + source "robots.txt.erb" + owner "root" + group "root" + mode 0644 +end + firewall_rule "accept-git" do action :accept source "net" diff --git a/cookbooks/git/templates/default/robots.txt.erb b/cookbooks/git/templates/default/robots.txt.erb new file mode 100644 index 000000000..b60d5e279 --- /dev/null +++ b/cookbooks/git/templates/default/robots.txt.erb @@ -0,0 +1,4 @@ +# DO NOT EDIT - This file is being maintained by Chef + +User-agent: * +Disallow: /*/snapshot/