]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: add robots.txt
authorGrant Slater <git@firefishy.com>
Sat, 8 Sep 2018 23:14:17 +0000 (00:14 +0100)
committerGrant Slater <git@firefishy.com>
Sat, 8 Sep 2018 23:14:17 +0000 (00:14 +0100)
cookbooks/imagery/files/default/robots.txt [new file with mode: 0644]
cookbooks/imagery/resources/site.rb

diff --git a/cookbooks/imagery/files/default/robots.txt b/cookbooks/imagery/files/default/robots.txt
new file mode 100644 (file)
index 0000000..5312873
--- /dev/null
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /layer/
index 8cb951389951cbf172fe22d3d98186cc169f5a9f..e1850849122e82e96a249ef73d420bcf7824796f 100644 (file)
@@ -55,6 +55,13 @@ action :create do
     variables :title => new_resource.title
   end
 
+  cookbook_file "/srv/#{new_resource.site}/robots.txt" do
+    source "robots.txt"
+    user "root"
+    group "root"
+    mode 0o644
+  end
+
   cookbook_file "/srv/#{new_resource.site}/imagery.css" do
     source "imagery.css"
     user "root"