2017-04-24 12:22:51 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Note that changing the domain leaves the old config in place
|
|
|
|
- name: Copy Nginx site config
|
2017-04-24 16:09:26 +00:00
|
|
|
become: true
|
2017-04-24 12:22:51 +00:00
|
|
|
template:
|
|
|
|
src: nginx.conf.j2
|
|
|
|
dest: /etc/nginx/sites-available/{{ domain }}
|
|
|
|
|
|
|
|
- name: Activate Nginx site config
|
2017-04-24 16:09:26 +00:00
|
|
|
become: true
|
2017-04-24 12:22:51 +00:00
|
|
|
file:
|
|
|
|
state: link
|
|
|
|
src: /etc/nginx/sites-available/{{ domain }}
|
|
|
|
path: /etc/nginx/sites-enabled/{{ domain }}
|
|
|
|
notify:
|
|
|
|
- validate nginx
|
|
|
|
- reload nginx
|