From b3b9c1fd482e4c6626453064cf7026b2e8d51d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 29 Jan 2016 11:16:38 +0100 Subject: [PATCH] copr: disallow robots on dev instance --- roles/copr/frontend/files/httpd/coprs.conf | 1 + roles/copr/frontend/files/robots.txt | 2 ++ roles/copr/frontend/tasks/main.yml | 3 +++ 3 files changed, 6 insertions(+) create mode 100644 roles/copr/frontend/files/robots.txt diff --git a/roles/copr/frontend/files/httpd/coprs.conf b/roles/copr/frontend/files/httpd/coprs.conf index 62ec6cf81a..fa7e2fd81b 100644 --- a/roles/copr/frontend/files/httpd/coprs.conf +++ b/roles/copr/frontend/files/httpd/coprs.conf @@ -1,6 +1,7 @@ NameVirtualHost *:80 LoadModule wsgi_module modules/mod_wsgi.so WSGISocketPrefix /var/run/wsgi +Alias /robots.txt /var/www/html/robots.txt ServerName copr.fedorainfracloud.org diff --git a/roles/copr/frontend/files/robots.txt b/roles/copr/frontend/files/robots.txt new file mode 100644 index 0000000000..1f53798bb4 --- /dev/null +++ b/roles/copr/frontend/files/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index 6ca2283382..442ca42aec 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -98,3 +98,6 @@ when: devel copy: src=banner-include.html dest=/var/lib/copr/ +- name: disallow robots on dev instance + when: devel + copy: src=robots.txt dest=/var/www/html/