Change domain from yerbamate.dev to yerbamate.ml

This commit is contained in:
Felix Ableitner 2020-11-03 22:47:27 +01:00
parent 5d0575d5b5
commit 65d643be46
5 changed files with 53 additions and 1 deletions

View file

@ -1,4 +1,4 @@
domain: yerbamate.dev domain: yerbamate.ml
letsencrypt_contact_email: !vault | letsencrypt_contact_email: !vault |
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
61393837323736363138343338353563313337383033366232343836633337333033636362616437 61393837323736363138343338353563313337383033366232343836633337333033636362616437

View file

@ -68,6 +68,10 @@
certbot certonly --nginx --agree-tos -d '{{ domain }}' -m '{{ letsencrypt_contact_email }}' -n certbot certonly --nginx --agree-tos -d '{{ domain }}' -m '{{ letsencrypt_contact_email }}' -n
certbot certonly --nginx --agree-tos -d 'weblate.{{ domain }}' -m '{{ letsencrypt_contact_email }}' -n certbot certonly --nginx --agree-tos -d 'weblate.{{ domain }}' -m '{{ letsencrypt_contact_email }}' -n
certbot certonly --nginx --agree-tos -d 'grafana.{{ domain }}' -m '{{ letsencrypt_contact_email }}' -n certbot certonly --nginx --agree-tos -d 'grafana.{{ domain }}' -m '{{ letsencrypt_contact_email }}' -n
# keep old domain working for a while
certbot certonly --nginx --agree-tos -d 'yerbamate.dev' -m '{{ letsencrypt_contact_email }}' -n
certbot certonly --nginx --agree-tos -d 'weblate.yerbamate.dev' -m '{{ letsencrypt_contact_email }}' -n
certbot certonly --nginx --agree-tos -d 'grafana.yerbamate.dev' -m '{{ letsencrypt_contact_email }}' -n
- name: reload nginx config and certs - name: reload nginx config and certs
@ -87,3 +91,9 @@
user=root user=root
job="certbot certonly --nginx -d weblate.{{ domain }} -n --deploy-hook 'nginx -s reload'" job="certbot certonly --nginx -d weblate.{{ domain }} -n --deploy-hook 'nginx -s reload'"
- name: renew grafana certificates
cron:
special_time=daily
name=certbot-renew-grafana
user=root
job="certbot certonly --nginx -d grafana.{{ domain }} -n --deploy-hook 'nginx -s reload'"

View file

@ -8,6 +8,20 @@ map $geoip_country_code $allowed_country {
IN no; IN no;
} }
# forward from old domain
server {
listen 80;
server_name yerbamate.dev;
return https://yerbamate.ml$request_uri;
}
server {
listen 443 ssl http2;
server_name yerbamate.dev;
ssl_certificate /etc/letsencrypt/live/yerbamate.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yerbamate.dev/privkey.pem;
return https://yerbamate.ml$request_uri;
}
server { server {
listen 80; listen 80;
server_name {{ domain }}; server_name {{ domain }};

View file

@ -1,3 +1,17 @@
# forward from old domain
server {
listen 80;
server_name grafana.yerbamate.dev;
return https://grafana.yerbamate.ml$request_uri;
}
server {
listen 443 ssl http2;
server_name grafana.yerbamate.dev;
ssl_certificate /etc/letsencrypt/live/grafana.yerbamate.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/grafana.yerbamate.dev/privkey.pem;
return https://grafana.yerbamate.ml$request_uri;
}
server { server {
listen 80; listen 80;
server_name grafana.{{ domain }}; server_name grafana.{{ domain }};

View file

@ -3,6 +3,20 @@ map $geoip_country_code $allowed_country {
CN no; CN no;
} }
# forward from old domain
server {
listen 80;
server_name weblate.yerbamate.dev;
return https://weblate.yerbamate.ml$request_uri;
}
server {
listen 443 ssl http2;
server_name weblate.yerbamate.dev;
ssl_certificate /etc/letsencrypt/live/weblate.yerbamate.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/weblate.yerbamate.dev/privkey.pem;
return https://weblate.yerbamate.ml$request_uri;
}
server { server {
listen 80; listen 80;
server_name weblate.{{ domain }}; server_name weblate.{{ domain }};