Nginx variable refactoring and general bug solving. Got interupted commit not tested

This commit is contained in:
2025-01-31 13:14:07 +01:00
parent b96d95f3e4
commit 11752f5e2e
23 changed files with 59 additions and 48 deletions

View File

@@ -11,15 +11,19 @@
notify: restart nginx
when: run_once_nginx is not defined and nginx_matomo_tracking | bool
- name: "Delete {{nginx.directories.configuration}} directory, when mode_reset"
file:
path: "{{ nginx.directories.configuration }}"
state: absent
when: mode_reset and run_once_nginx is not defined
- name: Ensure nginx configuration directories are present
file:
path: "{{ item }}"
state: directory
mode: '0755'
loop:
- "{{nginx_servers_directory}}"
- "{{nginx_maps_directory}}"
- "{{nginx_streams_directory}}"
recurse: yes
loop: "{{ nginx.directories.http + nginx.directories.streams }}"
when: run_once_nginx is not defined
- name: create nginx config file

View File

@@ -34,11 +34,11 @@ http
gzip_types application/atom+xml application/javascript application/xml+rss application/x-javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy text/javascript text/xml;
types_hash_max_size 4096;
include {{nginx_maps_directory}}*.conf;
include {{nginx_servers_directory}}*.conf;
include {{nginx.directories.http.maps}}*.conf;
include {{nginx.directories.http.servers}}*.conf;
}
# For port proxies
stream{
include {{nginx_streams_directory}}*.conf;
include {{nginx.directories.streams}}*.conf;
}