diff --git a/roles/httpd/website/files/robots/robots.txt.fedoraproject.org b/roles/httpd/website/files/robots/robots.txt.fedoraproject.org deleted file mode 100644 index dbf8929435..0000000000 --- a/roles/httpd/website/files/robots/robots.txt.fedoraproject.org +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: /wikiold diff --git a/roles/httpd/website/tasks/main.yml b/roles/httpd/website/tasks/main.yml index d0f88c8111..399392ea94 100644 --- a/roles/httpd/website/tasks/main.yml +++ b/roles/httpd/website/tasks/main.yml @@ -57,7 +57,7 @@ - httpd/website - name: And lastly, the robots.txt file - copy: > + template: > src={{item}} dest=/srv/web/robots.txt.{{site_name}} mode=0644 diff --git a/roles/httpd/website/files/robots/robots.txt b/roles/httpd/website/templates/robots/robots.txt similarity index 100% rename from roles/httpd/website/files/robots/robots.txt rename to roles/httpd/website/templates/robots/robots.txt diff --git a/roles/httpd/website/files/robots/robots.txt.admin.fedoraproject.org b/roles/httpd/website/templates/robots/robots.txt.admin.fedoraproject.org similarity index 100% rename from roles/httpd/website/files/robots/robots.txt.admin.fedoraproject.org rename to roles/httpd/website/templates/robots/robots.txt.admin.fedoraproject.org diff --git a/roles/httpd/website/files/robots/robots.txt.apps.fedoraproject.org b/roles/httpd/website/templates/robots/robots.txt.apps.fedoraproject.org similarity index 100% rename from roles/httpd/website/files/robots/robots.txt.apps.fedoraproject.org rename to roles/httpd/website/templates/robots/robots.txt.apps.fedoraproject.org diff --git a/roles/httpd/website/templates/robots/robots.txt.fedoraproject.org b/roles/httpd/website/templates/robots/robots.txt.fedoraproject.org new file mode 100644 index 0000000000..01aa679090 --- /dev/null +++ b/roles/httpd/website/templates/robots/robots.txt.fedoraproject.org @@ -0,0 +1,5 @@ +User-agent: * +{% if env == "staging" %} +Disallow: / +{% endif %} +Disallow: /wikiold diff --git a/roles/httpd/website/files/robots/robots.txt.greenwave.fedoraproject.org b/roles/httpd/website/templates/robots/robots.txt.greenwave.fedoraproject.org similarity index 100% rename from roles/httpd/website/files/robots/robots.txt.greenwave.fedoraproject.org rename to roles/httpd/website/templates/robots/robots.txt.greenwave.fedoraproject.org diff --git a/roles/httpd/website/files/robots/robots.txt.lockbox01 b/roles/httpd/website/templates/robots/robots.txt.lockbox01 similarity index 100% rename from roles/httpd/website/files/robots/robots.txt.lockbox01 rename to roles/httpd/website/templates/robots/robots.txt.lockbox01 diff --git a/roles/httpd/website/files/robots/robots.txt.paste.fedoraproject.org b/roles/httpd/website/templates/robots/robots.txt.paste.fedoraproject.org similarity index 100% rename from roles/httpd/website/files/robots/robots.txt.paste.fedoraproject.org rename to roles/httpd/website/templates/robots/robots.txt.paste.fedoraproject.org diff --git a/roles/httpd/website/files/robots/robots.txt.translate.fedoraproject.org b/roles/httpd/website/templates/robots/robots.txt.translate.fedoraproject.org similarity index 100% rename from roles/httpd/website/files/robots/robots.txt.translate.fedoraproject.org rename to roles/httpd/website/templates/robots/robots.txt.translate.fedoraproject.org