1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-20 17:41:55 +02:00

🔧 Better Ansible script

This commit is contained in:
Yohann D'ANELLO
2020-07-21 22:36:37 +02:00
parent 4761d46696
commit 5d70a809c2
7 changed files with 81 additions and 24 deletions

View File

@ -1,20 +1,21 @@
---
- name: Copy example conf of Nginx
command: cp /var/www/note_kfet/nginx_note.conf_example /var/www/note_kfet/nginx_note.conf
- 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
- 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
- name: Enable Nginx site
file:
src: /var/www/note_kfet/nginx_note.conf
src: /etc/nginx/sites-available/nginx_note.conf
dest: /etc/nginx/sites-enabled/nginx_note.conf
owner: www-data
group: www-data
state: link
- name: Copy conf to UWSGI
- name: Copy conf of UWSGI
file:
src: /var/www/note_kfet/uwsgi_note.ini
dest: /etc/uwsgi/apps-enabled/uwsgi_note.ini