mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented draft for top domain as matrix identifier name
This commit is contained in:
@@ -23,7 +23,25 @@
|
||||
when: run_once_nginx is not defined
|
||||
|
||||
- name: create nginx config file
|
||||
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
|
||||
template:
|
||||
src: nginx.conf.j2
|
||||
dest: /etc/nginx/nginx.conf
|
||||
notify: restart nginx
|
||||
when: run_once_nginx is not defined
|
||||
|
||||
- name: "include task certbot-matomo.yml"
|
||||
include_tasks: certbot-matomo.yml
|
||||
when: run_once_nginx is not defined
|
||||
vars:
|
||||
domain: "{{top_domain}}"
|
||||
when: run_once_nginx is not defined
|
||||
|
||||
- name: configure {{top_domain}}.conf
|
||||
template:
|
||||
src: "homepage.nginx.conf.j2"
|
||||
dest: "{{nginx_servers_directory}}{{top_domain}}.conf"
|
||||
vars:
|
||||
domain: "{{top_domain}}"
|
||||
notify: restart nginx
|
||||
when: run_once_nginx is not defined
|
||||
|
||||
|
26
roles/nginx/templates/homepage.nginx.conf.j2
Normal file
26
roles/nginx/templates/homepage.nginx.conf.j2
Normal file
@@ -0,0 +1,26 @@
|
||||
#default
|
||||
server
|
||||
{
|
||||
server_name {{domain}};
|
||||
|
||||
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
|
||||
|
||||
{% if nginx_matomo_tracking | bool %}
|
||||
{% include 'roles/nginx-matomo-tracking/templates/matomo-tracking.conf.j2' %}
|
||||
{% endif %}
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location /
|
||||
{
|
||||
root {{nginx_homepage_root}};
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /.well-known/ {
|
||||
alias {{nginx_well_known_root}};
|
||||
allow all;
|
||||
default_type "text/plain";
|
||||
autoindex on;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user