nk20/ansible/roles/4-nginx/tasks/main.yml

32 lines
719 B
YAML

---
- name: Copy example conf of Nginx
command: cp /var/www/note_kfet/nginx_note.conf_example /var/www/note_kfet/nginx_note.conf
- name: Update Nginx conf
replace:
path: /var/www/note_kfet/nginx_note.conf
regexp: 'note.example.org'
replace: 'bde-nk20-beta.adh.crans.org'
- name: Copy conf to Nginx
file:
src: /var/www/note_kfet/nginx_note.conf
dest: /etc/nginx/sites-enabled/nginx_note.conf
state: link
- name: Copy conf to UWSGI
file:
src: /var/www/note_kfet/uwsgi_note.ini
dest: /etc/uwsgi/apps-enabled/uwsgi_note.ini
state: link
- name: Reload Nginx
systemd:
name: nginx
state: reloaded
- name: Restart UWSGI
systemd:
name: uwsgi
state: restarted