2 Commits

4 changed files with 9 additions and 3 deletions

View File

@@ -7,7 +7,9 @@
- name: Reconfigure locales - name: Reconfigure locales
ansible.builtin.command: dpkg-reconfigure -f noninteractive locales ansible.builtin.command: dpkg-reconfigure -f noninteractive locales
changed_when: false
listen: reconfigure_locales listen: reconfigure_locales
when: not ansible_check_mode
- name: Restart WireGuard - name: Restart WireGuard
ansible.builtin.service: ansible.builtin.service:

View File

@@ -1 +1 @@
cached_dhparams_pem: /vagrant/scratch/dhparams.pem proxy_cached_dhparams_pem: /vagrant/scratch/dhparams.pem

View File

@@ -12,12 +12,12 @@
- name: Check for cached dhparams.pem file - name: Check for cached dhparams.pem file
ansible.builtin.stat: ansible.builtin.stat:
path: "{{ cached_dhparams_pem }}" path: "{{ proxy_cached_dhparams_pem }}"
register: dhparams_file register: dhparams_file
- name: Copy cached dhparams.pem to /etc/ssl/ - name: Copy cached dhparams.pem to /etc/ssl/
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ cached_dhparams_pem }}" src: "{{ proxy_cached_dhparams_pem }}"
dest: /etc/ssl/dhparams.pem dest: /etc/ssl/dhparams.pem
mode: "600" mode: "600"
remote_src: true remote_src: true

View File

@@ -1,13 +1,17 @@
server { server {
listen 80; listen 80;
{% if proxy.ipv6 is defined and proxy.ipv6 %}
listen [::]:80; listen [::]:80;
{% endif %}
server_name {{ item.domain }}; server_name {{ item.domain }};
return 301 https://{{ item.domain }}$request_uri; return 301 https://{{ item.domain }}$request_uri;
} }
server { server {
listen 443 ssl http2; listen 443 ssl http2;
{% if proxy.ipv6 is defined and proxy.ipv6 %}
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
{% endif %}
server_name {{ item.domain }}; server_name {{ item.domain }};
access_log /var/log/nginx/{{ item.domain }}.log main; access_log /var/log/nginx/{{ item.domain }}.log main;
{% if proxy.production is defined and proxy.production and proxy.dns_cloudflare.wildcard_domains is defined and item.tls.cert is not defined %} {% if proxy.production is defined and proxy.production and proxy.dns_cloudflare.wildcard_domains is defined and item.tls.cert is not defined %}