Parametrise playbook for a Swedish deployment
- Domain, admin email and git sources are variables (vars.yml); site.yml asserts that placeholders have been replaced before running - Remove DARC maintainers' SSH keys and the German URL-shortener redirects - Track the sv branch by default - README in Swedish Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
# ---- MÅSTE ändras innan första körning (site.yml avbryter annars) ----
|
||||
site_domain: "50ohm.se"
|
||||
site_admin_email: "[email protected]" # används av Let's Encrypt
|
||||
# Git-källor för den svenska versionen. Byt till dina egna repon/forkar.
|
||||
fiftyohm_repo: "https://example.invalid/50ohm.git"
|
||||
fiftyohm_contents_dl_repo: "https://example.invalid/50ohm-contents-dl.git"
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
fiftyohm_user: fiftyohm
|
||||
fiftyohm_group: fiftyohm
|
||||
destination_path: /srv/50ohm.de
|
||||
fiftyohm_branch: main
|
||||
fiftyohm_contents_dl_branch: main
|
||||
destination_path: "/srv/{{ site_domain }}"
|
||||
fiftyohm_branch: sv
|
||||
fiftyohm_contents_dl_branch: sv
|
||||
|
||||
certbot_install_method: package
|
||||
certbot_auto_renew: true
|
||||
@@ -11,11 +19,11 @@ certbot_auto_renew_hour: "5"
|
||||
certbot_auto_renew_minute: "15"
|
||||
certbot_create_if_missing: true
|
||||
certbot_create_method: webroot
|
||||
certbot_admin_email: [email protected]
|
||||
certbot_admin_email: "{{ site_admin_email }}"
|
||||
certbot_certs:
|
||||
- domains:
|
||||
- 50ohm.de
|
||||
- www.50ohm.de
|
||||
- "{{ site_domain }}"
|
||||
- "www.{{ site_domain }}"
|
||||
webroot: "{{ destination_path }}/letsencrypt"
|
||||
|
||||
nginx_listen_ipv6: true
|
||||
@@ -27,7 +35,7 @@ nginx_multi_accept: "off"
|
||||
nginx_error_log: "/var/log/nginx/error.log warn"
|
||||
nginx_accept_log: "/var/log/nginx/access.log main buffer=16k flush=2m"
|
||||
nginx_vhosts:
|
||||
- server_name: "50ohm.de"
|
||||
- server_name: "{{ site_domain }}"
|
||||
listen: "443 ssl http2"
|
||||
filename: 50ohm-https.conf
|
||||
root: "{{ destination_path }}/50ohm/build"
|
||||
@@ -37,34 +45,21 @@ nginx_vhosts:
|
||||
location "/" {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
# The old website from July 2025
|
||||
location "/past" {
|
||||
rewrite ^/past$ /past/ permanent;
|
||||
alias /var/www/50ohm.de/;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
# Set to a different path for testing purposes
|
||||
location "/future" {
|
||||
rewrite ^/future$ /future/ permanent;
|
||||
alias {{ destination_path }}/50ohm/build/;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/50ohm.de/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/50ohm.de/privkey.pem;
|
||||
include /srv/50ohm.de/url_shortener.conf;
|
||||
- server_name: "www.50ohm.de"
|
||||
ssl_certificate /etc/letsencrypt/live/{{ site_domain }}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{ site_domain }}/privkey.pem;
|
||||
- server_name: "www.{{ site_domain }}"
|
||||
listen: "443 ssl http2"
|
||||
filename: 50ohm-https-redirect.conf
|
||||
state: "present"
|
||||
extra_parameters: |
|
||||
ssl_certificate /etc/letsencrypt/live/50ohm.de/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/50ohm.de/privkey.pem;
|
||||
return 301 https://50ohm.de$request_uri;
|
||||
- server_name: "50ohm.de"
|
||||
ssl_certificate /etc/letsencrypt/live/{{ site_domain }}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{ site_domain }}/privkey.pem;
|
||||
return 301 https://{{ site_domain }}$request_uri;
|
||||
- server_name: "{{ site_domain }}"
|
||||
listen: "80"
|
||||
filename: 50ohm-http.conf
|
||||
server_name_redirect: "www.50ohm.de"
|
||||
server_name_redirect: "www.{{ site_domain }}"
|
||||
root: "{{ destination_path }}/50ohm/build"
|
||||
state: "present"
|
||||
extra_parameters: |
|
||||
@@ -73,5 +68,5 @@ nginx_vhosts:
|
||||
root {{ destination_path }}/letsencrypt;
|
||||
}
|
||||
location "/" {
|
||||
return 301 https://50ohm.de$request_uri;
|
||||
return 301 https://{{ site_domain }}$request_uri;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user