@@ -16,6 +16,17 @@
- 'Restart nginx'
when: with_nginx
+- name: 'Install custom mime types for nginx'
+ template:
+ src: 'nginx/mime.types.custom.j2'
+ dest: '/etc/nginx/mime.types.custom'
+ owner: 'root'
+ group: 'root'
+ mode: '0644'
+ notify:
+ - 'Restart nginx'
+ when: with_nginx
+
- name: 'Install nginx configuration'
template:
src: 'nginx/nginx.conf.j2'
@@ -0,0 +1,10 @@
+{% if ansible_prolog -%}
+{% from 'templates/ansible/prolog.j2' import prolog with context %}
+{{ prolog() }}
+{% endif -%}
+types {
+ application/font-woff2 woff2;
+ application/x-font-truetype ttf;
+ application/x-font-opentype otf;
+}
@@ -73,6 +73,7 @@ http {
### Define the MIME types for files ###
include /etc/nginx/mime.types;
+ include /etc/nginx/mime.types.custom;
default_type application/octet-stream;
# Format to use in log files