Skip to content
Snippets Groups Projects
Commit 3f0208a6 authored by ynerant's avatar ynerant
Browse files

🐛 First fix Ansible installation

parent 3dfed70e
No related branches found
No related tags found
1 merge request!85Beta soon
Pipeline #8224 canceled with stages
#!/usr/bin/env ansible-python
#!/usr/bin/env ansible-playbook
---
- hosts: beta-nk20
- hosts: bde-nk20-beta.adh.crans.org
roles:
- apt-basic
- nk20
- python-venv
- nginx
- 1-apt-basic
- 2-nk20
- 3-pip
- 4-nginx
......@@ -15,6 +15,6 @@
- texlive-latex-extra
- texlive-fonts-extra
- texlive-lang-french
register: pkg_result
retries: 3
until: pkg_result is succedded
register: pkg_result
retries: 3
until: pkg_result is succeeded
---
- name: Create note_kfet dir with good permissions
file:
path: /var/www
path: /var/www/note_kfet
state: directory
owner: www-data
group: foo
mode: u=rw,g=rws,o=r
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:
requirements: /var/www/note_kfet/requirements/base.txt
virtualenv: /var/www/note_kfet/env
virtualenv_command: /usr/bin/python3 -m venv
- name: Install PIP production dependencies
pip:
requirements: /var/www/note_kfet/requirements/production.txt
virtualenv: /var/www/note_kfet/env
virtualenv_command: /usr/bin/python3 -m venv
---
- 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.example
dest: /var/www/note_kfet/nginx_note.conf
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:
path: /var/www/note_kfet/nginx_note.conf
src: /var/www/note_kfet/nginx_note.conf
dest: /etc/nginx/sites-enabled/nginx_note.conf
state: link
- name: Copy conf to UWSGI
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
state: link
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment