32 lines
695 B
YAML
32 lines
695 B
YAML
|
---
|
||
|
|
||
|
- name: install nginx config
|
||
|
template:
|
||
|
src: files/nginx.conf
|
||
|
dest: /etc/nginx/nginx.conf
|
||
|
owner: www-data
|
||
|
|
||
|
- name: remove default config
|
||
|
file:
|
||
|
path: /etc/nginx/sites-enabled/default
|
||
|
state: absent
|
||
|
owner: www-data
|
||
|
|
||
|
- name: install site's configs
|
||
|
template:
|
||
|
src: files/sites-enabled/{{ item }}
|
||
|
dest: /etc/nginx/sites-enabled/{{ item }}
|
||
|
owner: www-data
|
||
|
loop: ['wiki.conf', 'root.conf', 'pma.conf', 'default_server.conf', 'cloud.conf']
|
||
|
|
||
|
- name: create dirs
|
||
|
file:
|
||
|
path: /var/www/{{item}}
|
||
|
state: directory
|
||
|
owner: www-data
|
||
|
loop: ['pma','cloud','wiki','default','root']
|
||
|
|
||
|
- name: reload nginx
|
||
|
service:
|
||
|
name: nginx
|
||
|
state: reloaded
|