fix: defaulting to nginx vars
This commit is contained in:
parent
10f4eb5817
commit
1349ce9c19
@ -55,7 +55,7 @@
|
|||||||
- name: Deploy nginx vhost configurations
|
- name: Deploy nginx vhost configurations
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: nginx-vhost.conf.j2
|
src: nginx-vhost.conf.j2
|
||||||
dest: "{{ nginx_conf_dir }}/{{ item.key }}.conf"
|
dest: "{{ nginx_conf_dir | default('/etc/nginx/conf.d') }}/{{ item.key }}.conf"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
|
|||||||
@ -28,8 +28,8 @@ server {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/{{ hostname }}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ hostname }}/privkey.pem;
|
||||||
|
|
||||||
# SSL configuration
|
# SSL configuration
|
||||||
ssl_protocols {{ nginx_ssl_protocols }};
|
ssl_protocols {{ nginx_ssl_protocols | default('TLSv1.3') }};
|
||||||
ssl_prefer_server_ciphers {{ 'on' if nginx_ssl_prefer_server_ciphers else 'off' }};
|
ssl_prefer_server_ciphers on;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Document root
|
# Document root
|
||||||
@ -51,7 +51,7 @@ server {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
{% if nginx_log_backend == 'journald' %}
|
{% if nginx_log_backend | default('journald') == 'journald' %}
|
||||||
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_{{ hostname | replace('.', '_') | replace('-', '_') }};
|
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_{{ hostname | replace('.', '_') | replace('-', '_') }};
|
||||||
error_log syslog:server=unix:/dev/log,nohostname,tag=nginx_{{ hostname | replace('.', '_') | replace('-', '_') }};
|
error_log syslog:server=unix:/dev/log,nohostname,tag=nginx_{{ hostname | replace('.', '_') | replace('-', '_') }};
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user