From fa879b19929951442c8e53ead8bbb871d7b2b187 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 25 Nov 2021 17:00:07 +0100 Subject: [PATCH] Update to 2021-11-25 17:00 --- roles/nginx/templates/ansible_conf.d/30-vhosts.conf.j2 | 8 ++++---- roles/nginx/templates/nginx.conf.j2 | 10 ++-------- roles/repo_base/tasks/AlmaLinux-8.yml | 2 +- roles/unifi/defaults/main.yml | 4 ++-- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/roles/nginx/templates/ansible_conf.d/30-vhosts.conf.j2 b/roles/nginx/templates/ansible_conf.d/30-vhosts.conf.j2 index 943be8a..6962d12 100644 --- a/roles/nginx/templates/ansible_conf.d/30-vhosts.conf.j2 +++ b/roles/nginx/templates/ansible_conf.d/30-vhosts.conf.j2 @@ -10,18 +10,18 @@ server { {% if vhost.port is iterable %} {% for port in vhost.port %} - listen {{ port }}; + listen {{ port }}{% if vhost.name == '_' %} default_server{% endif %}; {% endfor %} {% else %} - listen {{ vhost.port }}; + listen {{ vhost.port }}{% if vhost.name == '_' %} default_server{% endif %}; {% endif %} {% if vhost.ssl.enabled %} {% if vhost.ssl.port is iterable %} {% for port in vhost.ssl.port %} - listen {{ port }} ssl http2; + listen {{ port }} ssl http2{% if vhost.name == '_' %} default_server{% endif %}; {% endfor %} {% else %} - listen {{ vhost.ssl.port }} ssl http2; + listen {{ vhost.ssl.port }} ssl http2{% if vhost.name == '_' %} default_server{% endif %}; {% endif %} {% if vhost.ssl.cert is defined and vhost.ssl.key is defined %} diff --git a/roles/nginx/templates/nginx.conf.j2 b/roles/nginx/templates/nginx.conf.j2 index d5649ca..746d729 100644 --- a/roles/nginx/templates/nginx.conf.j2 +++ b/roles/nginx/templates/nginx.conf.j2 @@ -76,6 +76,7 @@ http { https 'max-age=31536000'; } +{% if '_' not in nginx_vhosts | map(attribute='name') | list %} server { listen 80 default_server; listen 443 default_server ssl http2; @@ -96,16 +97,9 @@ http { location / { } -# error_page 404 /404.html; -# location = /40x.html { -# } -# -# error_page 500 502 503 504 /50x.html; -# location = /50x.html { -# } - location ~ \.ht { deny all; } } +{% endif %} } diff --git a/roles/repo_base/tasks/AlmaLinux-8.yml b/roles/repo_base/tasks/AlmaLinux-8.yml index 530f28e..9f23f8c 100644 --- a/roles/repo_base/tasks/AlmaLinux-8.yml +++ b/roles/repo_base/tasks/AlmaLinux-8.yml @@ -3,7 +3,7 @@ - name: Configure repositories yum_repository: file: "{{ item.file }}" - description: "CentOS {{ item.name }}" + description: "AlmaLinux {{ item.name }}" name: "{{ item.name }}" baseurl: https://repo.almalinux.org/almalinux/$releasever/{{ item.dir }}/$basearch/os/ gpgcheck: True diff --git a/roles/unifi/defaults/main.yml b/roles/unifi/defaults/main.yml index c54dc53..5a45745 100644 --- a/roles/unifi/defaults/main.yml +++ b/roles/unifi/defaults/main.yml @@ -1,9 +1,9 @@ --- unifi_root_dir: /opt/unifi -unifi_version: 6.4.54 +unifi_version: 6.5.53 unifi_archive_url: https://www.ubnt.com/downloads/unifi/{{ unifi_version }}/UniFi.unix.zip -unifi_archive_sha1: c901dcce76dafdd9d7a07b5de1c99696469f2034 +unifi_archive_sha1: 17fc9cf63ffc24d38d2a9723ae6437e1161675db unifi_manage_upgrade: True unifi_http_port: 8080 unifi_https_port: 8443