2015-08-30 15:34:47 +02:00
|
|
|
---
|
|
|
|
- name: configure {{ site }} site
|
|
|
|
template: >
|
|
|
|
src=site.j2
|
|
|
|
dest=/etc/nginx/sites-available/{{ site }}
|
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=0644
|
2017-02-05 16:12:39 +01:00
|
|
|
notify: reload nginx
|
2015-08-30 15:34:47 +02:00
|
|
|
tags:
|
|
|
|
- nginx
|
|
|
|
- website
|
|
|
|
- "{{ site }}"
|
|
|
|
|
2015-08-30 17:55:05 +02:00
|
|
|
- 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 }}"
|
|
|
|
|
2015-08-30 15:34:47 +02:00
|
|
|
- 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
|
2017-02-05 16:12:39 +01:00
|
|
|
notify: reload nginx
|
2015-08-30 15:34:47 +02:00
|
|
|
tags:
|
|
|
|
- nginx
|
|
|
|
- website
|
|
|
|
- "{{ site }}"
|
|
|
|
|