Break proxy redirects out into a sub-playbook.

This commit is contained in:
Ralph Bean 2014-12-07 19:57:32 +00:00
parent 1a512eb73d
commit 7d59bbd0fd
2 changed files with 219 additions and 216 deletions

View file

@ -0,0 +1,214 @@
- name: Set up those proxy redirects. Wow!
hosts: proxies-stg
user: root
gather_facts: True
accelerate: "{{ accelerated }}"
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- include: "{{ handlers }}/restart_services.yml"
roles:
# Various app redirects
- role: httpd/redirect
name: community
website: admin.fedoraproject.org
path: /community
target: http://apps.fedoraproject.org/packages
- role: httpd/redirect
name: docs
website: fedoraproject.org
path: /docs
target: http://docs.fedoraproject.org/
- role: httpd/redirect
name: elections
website: admin.fedoraproject.org
path: /voting
target: https://apps.fedoraproject.org/voting
- role: httpd/redirect
name: people-fp-o
website: people.fedoraproject.org
target: https://fedorapeople.org
- role: httpd/redirect
name: fas
website: fas.fedoraproject.org
target: https://admin.fedoraproject.org/accounts/
- role: httpd/redirect
name: bodhi
website: bodhi.fedoraproject.org
target: https://admin.fedoraproject.org/updates/
- role: httpd/redirect
name: get-fedora
website: get.fedoraproject.org
target: http://fedoraproject.org/get-fedora
status: 302
- role: httpd/redirect
name: join-fedora
website: join.fedoraproject.org
target: http://fedoraproject.org/join-fedora
status: 302
- role: httpd/redirect
name: get-help
website: help.fedoraproject.org
target: http://fedoraproject.org/get-help
status: 302
- role: httpd/redirect
name: l10n
website: l10n.fedoraproject.org
target: https://translate.fedoraproject.org/
# Fonts on the wiki
- role: httpd/redirect
name: fonts-wiki
website: fonts.fedoraproject.org
target: https://fedoraproject.org/wiki/Category:Fonts_SIG
status: 302
# Releng
- role: httpd/redirect
name: nightly
website: nightly.fedoraproject.org
target: https://alt.fedoraproject.org/pub/alt/nightly-composes/
# Send fp.com to fp.org
- role: httpd/redirect
name: site
website: fedoraproject.com
target: http://fedoraproject.org/
# Planet/people convenience
- role: httpd/redirect
name: infofeed
website: fedoraproject.org
path: /infofeed
target: http://planet.fedoraproject.org/infofeed
- role: httpd/redirect
name: people
website: fedoraproject.org
path: /people
target: http://planet.fedoraproject.org/
- role: httpd/redirect
name: fedorapeople
website: fedoraproject.org
path: /fedorapeople
target: http://planet.fedoraproject.org/
# QA
- role: httpd/redirect
name: qa
website: qa.fedoraproject.org
target: https://fedoraproject.org/wiki/QA
# Various community sites
- role: httpd/redirect
name: it-fedoracommunity-redirect
website: it.fedoracommunity.org
target: http://www.fedoraonline.it/
status: 302
- role: httpd/redirect
name: uk-fedoracommunity-redirect
website: uk.fedoracommunity.org
target: http://www.fedora-uk.org/
status: 302
# Spins
- role: httpd/redirect
name: kde
website: kde.fedoraproject.org
target: http://spins.fedoraproject.org/kde/
status: 302
# Various sites that we are friends with
- role: httpd/redirect
name: port389
website: port389.org
target: http://directory.fedoraproject.org/
- role: httpd/redirect
name: k12linux
website: k12linux.org
target: https://fedorahosted.org/k12linux/
# Cloudy bits
- role: httpd/redirect
name: cloud-front-page
website: fedoraproject.org
target: https://fedoraproject.org/en/get-fedora#clouds
## Cloud image redirects
# Redirects/pointers for fedora 20 cloud images
- role: httpd/redirect
name: cloud-64bit-20
website: cloud.fedoraproject.org
path: /fedora-20.x86_64.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-32bit-20
website: cloud.fedoraproject.org
path: /fedora-20.i386.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/i386/Fedora-i386-20-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-64bit-20-raw
website: cloud.fedoraproject.org
path: /fedora-20.x86_64.raw.xz
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.raw.xz
- role: httpd/redirect
name: cloud-32bit-20-raw
website: cloud.fedoraproject.org
path: /fedora-20.i386.raw
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/i386/Fedora-i386-20-20140407-sda.raw.xz
# Redirects/pointers for fedora 19 cloud images
- role: httpd/redirect
name: cloud-64bit-19
website: cloud.fedoraproject.org
path: /fedora-19.x86_64.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/19/Images/x86_64/Fedora-x86_64-19-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-32bit-19
website: cloud.fedoraproject.org
path: /fedora-19.i386.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/19/Images/i386/Fedora-i386-19-20140407-sda.qcow2
# Redirects/pointers for latest fedora cloud images.
- role: httpd/redirect
name: cloud-64bit-latest
website: cloud.fedoraproject.org
path: /fedora-latest.x86_64.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-32bit-latest
website: cloud.fedoraproject.org
path: /fedora-latest.i386.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/i386/Fedora-i386-20-20140407-sda.qcow2

View file

@ -45,220 +45,9 @@
handlers:
- include: "{{ handlers }}/restart_services.yml"
- name: Apply all the wonderful proxy configuration
hosts: proxies-stg
user: root
gather_facts: True
accelerate: "{{ accelerated }}"
# After setting up the "basics" of the proxy hosts above, here below we break
# out the proxy-specific configuration into a couple different sub-playbooks.
# Othewise, this file would be unbearably long.
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "{{ private }}/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
handlers:
- include: "{{ handlers }}/restart_services.yml"
roles:
#### BEGIN REDIRECTS ####
# Various app redirects
- role: httpd/redirect
name: community
website: admin.fedoraproject.org
path: /community
target: http://apps.fedoraproject.org/packages
- role: httpd/redirect
name: docs
website: fedoraproject.org
path: /docs
target: http://docs.fedoraproject.org/
- role: httpd/redirect
name: elections
website: admin.fedoraproject.org
path: /voting
target: https://apps.fedoraproject.org/voting
- role: httpd/redirect
name: people-fp-o
website: people.fedoraproject.org
target: https://fedorapeople.org
- role: httpd/redirect
name: fas
website: fas.fedoraproject.org
target: https://admin.fedoraproject.org/accounts/
- role: httpd/redirect
name: bodhi
website: bodhi.fedoraproject.org
target: https://admin.fedoraproject.org/updates/
- role: httpd/redirect
name: get-fedora
website: get.fedoraproject.org
target: http://fedoraproject.org/get-fedora
status: 302
- role: httpd/redirect
name: join-fedora
website: join.fedoraproject.org
target: http://fedoraproject.org/join-fedora
status: 302
- role: httpd/redirect
name: get-help
website: help.fedoraproject.org
target: http://fedoraproject.org/get-help
status: 302
- role: httpd/redirect
name: l10n
website: l10n.fedoraproject.org
target: https://translate.fedoraproject.org/
# Fonts on the wiki
- role: httpd/redirect
name: fonts-wiki
website: fonts.fedoraproject.org
target: https://fedoraproject.org/wiki/Category:Fonts_SIG
status: 302
# Releng
- role: httpd/redirect
name: nightly
website: nightly.fedoraproject.org
target: https://alt.fedoraproject.org/pub/alt/nightly-composes/
# Send fp.com to fp.org
- role: httpd/redirect
name: site
website: fedoraproject.com
target: http://fedoraproject.org/
# Planet/people convenience
- role: httpd/redirect
name: infofeed
website: fedoraproject.org
path: /infofeed
target: http://planet.fedoraproject.org/infofeed
- role: httpd/redirect
name: people
website: fedoraproject.org
path: /people
target: http://planet.fedoraproject.org/
- role: httpd/redirect
name: fedorapeople
website: fedoraproject.org
path: /fedorapeople
target: http://planet.fedoraproject.org/
# QA
- role: httpd/redirect
name: qa
website: qa.fedoraproject.org
target: https://fedoraproject.org/wiki/QA
# Various community sites
- role: httpd/redirect
name: it-fedoracommunity-redirect
website: it.fedoracommunity.org
target: http://www.fedoraonline.it/
status: 302
- role: httpd/redirect
name: uk-fedoracommunity-redirect
website: uk.fedoracommunity.org
target: http://www.fedora-uk.org/
status: 302
# Spins
- role: httpd/redirect
name: kde
website: kde.fedoraproject.org
target: http://spins.fedoraproject.org/kde/
status: 302
# Various sites that we are friends with
- role: httpd/redirect
name: port389
website: port389.org
target: http://directory.fedoraproject.org/
- role: httpd/redirect
name: k12linux
website: k12linux.org
target: https://fedorahosted.org/k12linux/
# Cloudy bits
- role: httpd/redirect
name: cloud-front-page
website: fedoraproject.org
target: https://fedoraproject.org/en/get-fedora#clouds
## Cloud image redirects
# Redirects/pointers for fedora 20 cloud images
- role: httpd/redirect
name: cloud-64bit-20
website: cloud.fedoraproject.org
path: /fedora-20.x86_64.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-32bit-20
website: cloud.fedoraproject.org
path: /fedora-20.i386.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/i386/Fedora-i386-20-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-64bit-20-raw
website: cloud.fedoraproject.org
path: /fedora-20.x86_64.raw.xz
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.raw.xz
- role: httpd/redirect
name: cloud-32bit-20-raw
website: cloud.fedoraproject.org
path: /fedora-20.i386.raw
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/i386/Fedora-i386-20-20140407-sda.raw.xz
# Redirects/pointers for fedora 19 cloud images
- role: httpd/redirect
name: cloud-64bit-19
website: cloud.fedoraproject.org
path: /fedora-19.x86_64.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/19/Images/x86_64/Fedora-x86_64-19-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-32bit-19
website: cloud.fedoraproject.org
path: /fedora-19.i386.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/19/Images/i386/Fedora-i386-19-20140407-sda.qcow2
# Redirects/pointers for latest fedora cloud images.
- role: httpd/redirect
name: cloud-64bit-latest
website: cloud.fedoraproject.org
path: /fedora-latest.x86_64.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/x86_64/Fedora-x86_64-20-20140407-sda.qcow2
- role: httpd/redirect
name: cloud-32bit-latest
website: cloud.fedoraproject.org
path: /fedora-latest.i386.qcow2
target: http://download.fedoraproject.org/pub/fedora/linux/updates/20/Images/i386/Fedora-i386-20-20140407-sda.qcow2
#### END REDIRECTS ####
#- include: proxies-websites.yml
- include: proxies-redirects.yml