Working on the proxies-websites.yml playbook.
This commit is contained in:
parent
ee9fbbecaa
commit
00269dc0a8
14 changed files with 139 additions and 3 deletions
2
roles/httpd/website/files/robots/robots.txt
Normal file
2
roles/httpd/website/files/robots/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Crawl-delay: 10
|
|
@ -0,0 +1,8 @@
|
|||
User-agent: *
|
||||
Disallow: /voting
|
||||
Disallow: /mirrormanager
|
||||
Disallow: /pkgdb/packages/name
|
||||
|
||||
# Temp block http://www.80legs.com/webcrawler.html
|
||||
User-agent: 008
|
||||
Disallow: /
|
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow: /wikiold
|
4
roles/httpd/website/files/robots/robots.txt.lockbox01
Normal file
4
roles/httpd/website/files/robots/robots.txt.lockbox01
Normal file
|
@ -0,0 +1,4 @@
|
|||
User-agent: *
|
||||
Crawl-delay: 10
|
||||
Allow: /infra/docs/
|
||||
Disallow: /infra
|
|
@ -0,0 +1,4 @@
|
|||
User-agent: *
|
||||
Crawl-delay: 10
|
||||
Disallow: /*download_zip/$
|
||||
Disallow: /*download_targz/$
|
70
roles/httpd/website/tasks/main.yml
Normal file
70
roles/httpd/website/tasks/main.yml
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Expected vars
|
||||
# - name...
|
||||
# - ips: []
|
||||
# - server_aliases: []
|
||||
# - server_admin: webmaster@fedoraproject.org
|
||||
# - ssl: true
|
||||
# - sslonly: false
|
||||
# - cert_name: ""
|
||||
# - SSLCertificateChainFile: ""
|
||||
# - gzip: false
|
||||
|
||||
- name: Create site directory in httpd/conf.d/{{name}}
|
||||
file: >
|
||||
dest=/etc/httpd/conf.d/{{name}}
|
||||
state=directory
|
||||
owner=root
|
||||
group=root
|
||||
mode=0755
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- httpd
|
||||
- httpd/website
|
||||
|
||||
# TODO - copy in Httpd::Certificate
|
||||
|
||||
- name: Copy over primary template for {{name}}
|
||||
template: >
|
||||
src=website.conf
|
||||
dest=/etc/httpd/conf.d/{{name}}.conf
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- httpd
|
||||
- httpd/redirect
|
||||
|
||||
- name: Copy over some subordinate templates for {{name}}
|
||||
template: >
|
||||
src={{item}}.conf
|
||||
dest=/etc/httpd/conf.d/{{name}}/{{item}}.conf
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
with_items:
|
||||
- logs
|
||||
- robots
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- httpd
|
||||
- httpd/redirect
|
||||
|
||||
- name: And lastly, the robots.txt file
|
||||
copy: >
|
||||
src={{item}}
|
||||
dest=/srv/web/robots.txt.{{name}}
|
||||
mode=0644
|
||||
owner=root
|
||||
group=root
|
||||
with_first_found:
|
||||
- robots/robots.txt.{{name}}
|
||||
- robots/robots.txt
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- httpd
|
||||
- httpd/redirect
|
2
roles/httpd/website/templates/logs.conf
Normal file
2
roles/httpd/website/templates/logs.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
CustomLog "logs/{{ name }}-access.log" combined
|
||||
ErrorLog "logs/{{ name }}-error.log"
|
1
roles/httpd/website/templates/robots.conf
Normal file
1
roles/httpd/website/templates/robots.conf
Normal file
|
@ -0,0 +1 @@
|
|||
Alias /robots.txt /srv/web/robots.txt.{{ name }}
|
8
roles/httpd/website/vars/main.yml
Normal file
8
roles/httpd/website/vars/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
ips: []
|
||||
server_aliases: []
|
||||
server_admin: webmaster@fedoraproject.org
|
||||
ssl: true
|
||||
sslonly: false
|
||||
cert_name: ""
|
||||
SSLCertificateChainFile: ""
|
||||
gzip: false
|
Loading…
Add table
Add a link
Reference in a new issue