eed7317b0c
- Switch "worker_processes" to "auto" - Disable "server_tokens" globally - Change formatting for readability
36 lines
712 B
YAML
36 lines
712 B
YAML
---
|
|
- name: configure {{ site }} site
|
|
template: >
|
|
src=site.j2
|
|
dest=/etc/nginx/sites-available/{{ site }}
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
notify: reload nginx
|
|
tags:
|
|
- nginx
|
|
- website
|
|
- "{{ site }}"
|
|
|
|
- name: create {{ site }} root
|
|
file: path={{ document_root.path }} state=directory owner=www-data group=www-data mode=0755
|
|
when: document_root.create
|
|
tags:
|
|
- nginx
|
|
- website
|
|
- "{{ site }}"
|
|
|
|
- name: enable {{ site }} site
|
|
file: >
|
|
src=/etc/nginx/sites-available/{{ site }}
|
|
dest=/etc/nginx/sites-enabled/{{ site }}
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
state=link
|
|
notify: reload nginx
|
|
tags:
|
|
- nginx
|
|
- website
|
|
- "{{ site }}"
|
|
|