1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00
nk20/ansible/roles/4-nginx/tasks/main.yml

45 lines
876 B
YAML
Raw Normal View History

---
2020-09-01 14:32:13 +00:00
- name: Install NGINX
apt:
name: nginx
register: pkg_result
retries: 3
until: pkg_result is succeeded
2020-07-21 20:36:37 +00:00
- name: Copy conf of Nginx
template:
src: "nginx_note.conf"
dest: /etc/nginx/sites-available/nginx_note.conf
mode: 0644
owner: www-data
group: www-data
2020-07-15 07:27:11 +00:00
2020-07-21 20:36:37 +00:00
- name: Enable Nginx site
file:
2020-07-21 20:36:37 +00:00
src: /etc/nginx/sites-available/nginx_note.conf
dest: /etc/nginx/sites-enabled/nginx_note.conf
2020-07-21 20:36:37 +00:00
owner: www-data
group: www-data
state: link
- name: Disable default Nginx site
file:
dest: /etc/nginx/sites-enabled/default
state: absent
2020-07-21 20:36:37 +00:00
- name: Copy conf of UWSGI
file:
2020-07-15 07:27:11 +00:00
src: /var/www/note_kfet/uwsgi_note.ini
dest: /etc/uwsgi/apps-enabled/uwsgi_note.ini
state: link
2020-07-15 08:09:28 +00:00
- name: Reload Nginx
systemd:
name: nginx
state: reloaded
- name: Restart UWSGI
systemd:
name: uwsgi
state: restarted