]> git.openstreetmap.org Git - chef.git/commitdiff
Add initial robots.txt to gitweb to exclude snapshot links
authorGrant Slater <git@firefishy.com>
Tue, 4 Jun 2013 23:45:25 +0000 (00:45 +0100)
committerGrant Slater <git@firefishy.com>
Tue, 4 Jun 2013 23:45:25 +0000 (00:45 +0100)
cookbooks/git/recipes/server.rb
cookbooks/git/templates/default/robots.txt.erb [new file with mode: 0644]

index c3382a2cf19ccd5b78ebe0e70a6feb4f913148a3..f679ce82b7f39f6ec820fe9ef8598e40d596e176 100644 (file)
@@ -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 (file)
index 0000000..b60d5e2
--- /dev/null
@@ -0,0 +1,4 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+User-agent: *
+Disallow: /*/snapshot/