Use copr_frontend_public_hostname instead of inventory_hostname
Because inventory_hostname is set to copr-fe.cloud.fedoraproject.org on frontend production instance. However, we want a variable that is evaluated to copr.fedorainfracloud.org
This commit is contained in:
parent
e78f97bfbb
commit
c892543dc3
2 changed files with 10 additions and 10 deletions
|
@ -109,7 +109,7 @@
|
||||||
|
|
||||||
- name: Check that cert file exists
|
- name: Check that cert file exists
|
||||||
stat:
|
stat:
|
||||||
path: "/etc/letsencrypt/live/{{ inventory_hostname }}/cert.pem"
|
path: "/etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/cert.pem"
|
||||||
register: stat_cert
|
register: stat_cert
|
||||||
|
|
||||||
- name: Should admin run certbot?
|
- name: Should admin run certbot?
|
||||||
|
|
|
@ -14,12 +14,12 @@ Listen 443 https
|
||||||
SSLCertificateKeyFile /etc/pki/tls/private/copr.fedorainfracloud.org.key
|
SSLCertificateKeyFile /etc/pki/tls/private/copr.fedorainfracloud.org.key
|
||||||
SSLCertificateChainFile /etc/pki/tls/certs/copr.fedorainfracloud.org.intermediate.crt
|
SSLCertificateChainFile /etc/pki/tls/certs/copr.fedorainfracloud.org.intermediate.crt
|
||||||
{% else %}
|
{% else %}
|
||||||
SSLCertificateFile /etc/letsencrypt/live/{{ inventory_hostname }}/cert.pem
|
SSLCertificateFile /etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/cert.pem
|
||||||
SSLCertificateKeyFile /etc/letsencrypt/live/{{ inventory_hostname }}/privkey.pem
|
SSLCertificateKeyFile /etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/privkey.pem
|
||||||
SSLCertificateChainFile /etc/letsencrypt/live/{{ inventory_hostname }}/fullchain.pem
|
SSLCertificateChainFile /etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/fullchain.pem
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
ServerName {{ inventory_hostname }}
|
ServerName {{ copr_frontend_public_hostname }}
|
||||||
|
|
||||||
WSGIPassAuthorization On
|
WSGIPassAuthorization On
|
||||||
WSGIScriptAlias / /usr/share/copr/coprs_frontend/application
|
WSGIScriptAlias / /usr/share/copr/coprs_frontend/application
|
||||||
|
@ -68,14 +68,14 @@ Listen 443 https
|
||||||
SSLCertificateKeyFile /etc/pki/tls/private/copr.fedorainfracloud.org.key
|
SSLCertificateKeyFile /etc/pki/tls/private/copr.fedorainfracloud.org.key
|
||||||
SSLCertificateChainFile /etc/pki/tls/certs/copr.fedorainfracloud.org.intermediate.crt
|
SSLCertificateChainFile /etc/pki/tls/certs/copr.fedorainfracloud.org.intermediate.crt
|
||||||
{% else %}
|
{% else %}
|
||||||
SSLCertificateFile /etc/letsencrypt/live/{{ inventory_hostname }}/cert.pem
|
SSLCertificateFile /etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/cert.pem
|
||||||
SSLCertificateKeyFile /etc/letsencrypt/live/{{ inventory_hostname }}/privkey.pem
|
SSLCertificateKeyFile /etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/privkey.pem
|
||||||
SSLCertificateChainFile /etc/letsencrypt/live/{{ inventory_hostname }}/fullchain.pem
|
SSLCertificateChainFile /etc/letsencrypt/live/{{ copr_frontend_public_hostname }}/fullchain.pem
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
ServerAlias {{ inventory_hostname }}
|
ServerAlias {{ copr_frontend_public_hostname }}
|
||||||
|
|
||||||
Redirect 302 / https://{{ inventory_hostname }}/
|
Redirect 302 / https://{{ copr_frontend_public_hostname }}/
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue