proxy prerelease redirects: try a different way to disable/enable them
We had a messy setup that needed you to comment a block in one place and uncomment it in the other. Instead lets try and use the template to properly handle this and make a file without the redirect when we don't want it enabled. This only should affect staging now. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
3fa98c7839
commit
734d1de121
4 changed files with 20 additions and 52 deletions
|
@ -298,3 +298,9 @@ postvpnservices: []
|
|||
# true or false if we are or are not a copr build virthost.
|
||||
# Default to false
|
||||
copr_build_virthost: false
|
||||
|
||||
#
|
||||
# Set a redirectmatch variable we can use to disable some redirectmatches
|
||||
# like the prerelease to final ones.
|
||||
#
|
||||
redirectmatch_enabled: True
|
||||
|
|
|
@ -88,58 +88,6 @@
|
|||
- hosts
|
||||
|
||||
tasks:
|
||||
#
|
||||
# When we have a prerelease we also need to drop the config files.
|
||||
|
||||
# - name: Remove prerelease-to-final-spins-1
|
||||
# file: path=/etc/httpd/conf.d/spins.fedoraproject.org/prerelease-to-final-spins-1-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
|
||||
# - name: Remove prerelease-to-final-spins-2
|
||||
# file: path=/etc/httpd/conf.d/spins.fedoraproject.org/prerelease-to-final-spins-2-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-labs-1
|
||||
# file: path=/etc/httpd/conf.d/labs.fedoraproject.org/prerelease-to-final-labs-1-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-labs-2
|
||||
# file: path=/etc/httpd/conf.d/labs.fedoraproject.org/prerelease-to-final-labs-2-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-arm-1
|
||||
# file: path=/etc/httpd/conf.d/arm.fedoraproject.org/prerelease-to-final-arm-1-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-arm-2
|
||||
# file: path=/etc/httpd/conf.d/arm.fedoraproject.org/prerelease-to-final-arm-2-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-alt-1
|
||||
# file: path=/etc/httpd/conf.d/alt.fedoraproject.org/prerelease-to-final-alt-1-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-gfo-atomic-redirectmatch
|
||||
# file: path=/etc/httpd/conf.d/getfedora.org/prerelease-to-final-gfo-atomic-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-gfo-srv-redirectmatch
|
||||
# file: path=/etc/httpd/conf.d/getfedora.org/prerelease-to-final-gfo-srv-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
#
|
||||
# - name: Remove prerelease-to-final-gfo-ws-redirectmatch
|
||||
# file: path=/etc/httpd/conf.d/getfedora.org/prerelease-to-final-gfo-ws-redirectmatch.conf state=file
|
||||
# tags:
|
||||
# - httpd/redirect
|
||||
|
||||
# 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.
|
||||
|
|
|
@ -283,6 +283,7 @@
|
|||
website: getfedora.org
|
||||
regex: /(.*)workstation/prerelease.*$
|
||||
target: https://stg.getfedora.org/$1/workstation
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -290,6 +291,7 @@
|
|||
website: getfedora.org
|
||||
regex: /(.*)server/prerelease.*$
|
||||
target: https://stg.getfedora.org/$1/server
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -297,6 +299,7 @@
|
|||
website: getfedora.org
|
||||
regex: /(.*)atomic/prerelease.*$
|
||||
target: https://stg.getfedora.org/$1/atomic
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -304,6 +307,7 @@
|
|||
website: labs.fedoraproject.org
|
||||
regex: /(.*)prerelease.*$
|
||||
target: https://labs.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -311,6 +315,7 @@
|
|||
website: spins.fedoraproject.org
|
||||
regex: /(.*)prerelease.*$
|
||||
target: https://spins.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -318,6 +323,7 @@
|
|||
website: arm.fedoraproject.org
|
||||
regex: /(.*)prerelease.*$
|
||||
target: https://arm.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -325,6 +331,7 @@
|
|||
website: labs.fedoraproject.org
|
||||
regex: /prerelease.*$
|
||||
target: https://labs.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -332,6 +339,7 @@
|
|||
website: spins.fedoraproject.org
|
||||
regex: /prerelease.*$
|
||||
target: https://spins.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -339,6 +347,7 @@
|
|||
website: arm.fedoraproject.org
|
||||
regex: /prerelease.*$
|
||||
target: https://arm.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -346,6 +355,7 @@
|
|||
website: getfedora.org
|
||||
regex: /cloud/.*$
|
||||
target: https://alt.stg.fedoraproject.org/cloud/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -353,6 +363,7 @@
|
|||
website: getfedora.org
|
||||
regex: /(.*)/cloud/download.*$
|
||||
target: https://alt.stg.fedoraproject.org/$1/cloud
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
- role: httpd/redirectmatch
|
||||
|
@ -360,6 +371,7 @@
|
|||
website: alt.fedoraproject.org
|
||||
regex: /prerelease.*$
|
||||
target: https://alt.stg.fedoraproject.org/$1
|
||||
redirectmatch_enabled: false
|
||||
when: env == 'staging'
|
||||
|
||||
# end staging
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
{% if redirectmatch_enabled %}
|
||||
RedirectMatch {{ status }} {{ regex }} {{ target }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue