Enable gzip compression
This commit is contained in:
parent
ac6bff1e72
commit
8cdf2d7ab8
|
@ -35,6 +35,19 @@
|
|||
regexp: "^(.*)ssl_protocols"
|
||||
line: "\tssl_protocols TLSv1.2 TLSv1.3;"
|
||||
|
||||
- name: gzip compression
|
||||
lineinfile:
|
||||
path: /etc/nginx/nginx.conf
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
state: present
|
||||
with_items:
|
||||
- regexp: "^(.*)gzip_comp_level"
|
||||
line: "\tgzip_comp_level 5;"
|
||||
- regexp: "^(.*)gzip_types"
|
||||
line: "\tgzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;"
|
||||
|
||||
|
||||
- import_tasks: create-vhosts.yml
|
||||
|
||||
become: "{{ nginx_become }}"
|
||||
|
|
Loading…
Reference in New Issue