disable indexing of pagure-staging - converted robots.txt to template
This commit is contained in:
parent
86ee884bde
commit
77eb639cee
3 changed files with 10 additions and 6 deletions
|
@ -1,5 +0,0 @@
|
|||
User-agent: *
|
||||
Disallow: /api
|
||||
Disallow: /login
|
||||
Disallow: /*/raw
|
||||
Crawl-Delay: 2
|
|
@ -31,7 +31,7 @@
|
|||
- pagure
|
||||
|
||||
- name: Put in robots.txt
|
||||
copy: src=robots.txt dest=/var/www/html/robots.txt
|
||||
template: src=robots.txt.j2 dest=/var/www/html/robots.txt
|
||||
tags:
|
||||
- pagure
|
||||
|
||||
|
|
9
roles/pagure/frontend/templates/robots.txt.j2
Normal file
9
roles/pagure/frontend/templates/robots.txt.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
User-agent: *
|
||||
{% if env == 'pagure-staging' %}
|
||||
Disallow: /
|
||||
{% else %}
|
||||
Disallow: /api
|
||||
Disallow: /login
|
||||
Disallow: /*/raw
|
||||
Crawl-Delay: 2
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue