mirror of https://gitlab.crans.org/bde/nk20
🐛 First fix Ansible installation
This commit is contained in:
parent
3dfed70eb1
commit
3f0208a664
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env ansible-python
|
#!/usr/bin/env ansible-playbook
|
||||||
---
|
---
|
||||||
|
|
||||||
- hosts: beta-nk20
|
- hosts: bde-nk20-beta.adh.crans.org
|
||||||
roles:
|
roles:
|
||||||
- apt-basic
|
- 1-apt-basic
|
||||||
- nk20
|
- 2-nk20
|
||||||
- python-venv
|
- 3-pip
|
||||||
- nginx
|
- 4-nginx
|
||||||
|
|
|
@ -17,4 +17,4 @@
|
||||||
- texlive-lang-french
|
- texlive-lang-french
|
||||||
register: pkg_result
|
register: pkg_result
|
||||||
retries: 3
|
retries: 3
|
||||||
until: pkg_result is succedded
|
until: pkg_result is succeeded
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
- name: Create note_kfet dir with good permissions
|
||||||
|
file:
|
||||||
|
path: /var/www/note_kfet
|
||||||
|
state: directory
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
mode: u=rwx,g=rwxs,o=rx
|
||||||
|
|
||||||
|
- name: Clone Note Kfet
|
||||||
|
git:
|
||||||
|
repo: https://gitlab.crans.org/bde/nk20.git
|
||||||
|
dest: /var/www/note_kfet
|
||||||
|
version: beta-soon
|
||||||
|
track_submodules: yes
|
||||||
|
|
||||||
|
- name: Update permissions for note_kfet dir
|
||||||
|
file:
|
||||||
|
path: /var/www/note_kfet
|
||||||
|
state: directory
|
||||||
|
recurse: yes
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
|
@ -3,8 +3,10 @@
|
||||||
pip:
|
pip:
|
||||||
requirements: /var/www/note_kfet/requirements/base.txt
|
requirements: /var/www/note_kfet/requirements/base.txt
|
||||||
virtualenv: /var/www/note_kfet/env
|
virtualenv: /var/www/note_kfet/env
|
||||||
|
virtualenv_command: /usr/bin/python3 -m venv
|
||||||
|
|
||||||
- name: Install PIP production dependencies
|
- name: Install PIP production dependencies
|
||||||
pip:
|
pip:
|
||||||
requirements: /var/www/note_kfet/requirements/production.txt
|
requirements: /var/www/note_kfet/requirements/production.txt
|
||||||
virtualenv: /var/www/note_kfet/env
|
virtualenv: /var/www/note_kfet/env
|
||||||
|
virtualenv_command: /usr/bin/python3 -m venv
|
|
@ -1,19 +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: Update Nginx conf
|
- name: Update Nginx conf
|
||||||
replace:
|
replace:
|
||||||
path: /var/www/note_kfet/nginx_note.conf.example
|
path: /var/www/note_kfet/nginx_note.conf
|
||||||
dest: /var/www/note_kfet/nginx_note.conf
|
|
||||||
regexp: 'note.example.org'
|
regexp: 'note.example.org'
|
||||||
replace: 'bde-nk20-beta.adh.crans.org'
|
replace: 'bde-nk20-beta.adh.crans.org'
|
||||||
|
|
||||||
- name: Copy conf to Nginx
|
- name: Copy conf to Nginx
|
||||||
file:
|
file:
|
||||||
path: /var/www/note_kfet/nginx_note.conf
|
src: /var/www/note_kfet/nginx_note.conf
|
||||||
dest: /etc/nginx/sites-enabled/nginx_note.conf
|
dest: /etc/nginx/sites-enabled/nginx_note.conf
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
- name: Copy conf to UWSGI
|
- name: Copy conf to UWSGI
|
||||||
file:
|
file:
|
||||||
path: /var/www/note_kfet/uwsgi_note.ini
|
src: /var/www/note_kfet/uwsgi_note.ini
|
||||||
dest: /etc/uwsgi/apps-enabled/uwsgi_note.ini
|
dest: /etc/uwsgi/apps-enabled/uwsgi_note.ini
|
||||||
state: link
|
state: link
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
- name: Create note_kfet dir with good permissions
|
|
||||||
file:
|
|
||||||
path: /var/www
|
|
||||||
owner: www-data
|
|
||||||
group: foo
|
|
||||||
mode: u=rw,g=rws,o=r
|
|
||||||
|
|
||||||
- name: Clone Note Kfet
|
|
||||||
git:
|
|
||||||
repo: https://gitlab.crans.org/bde/nk20.git
|
|
||||||
dest: /var/www/note_kfet
|
|
Loading…
Reference in New Issue