75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
---
|
|
- name: Install re2o dependencies
|
|
apt:
|
|
update_cache: true
|
|
name:
|
|
- python3-django
|
|
- python3-dateutil
|
|
- python3-djangorestframework
|
|
- python3-django-reversion
|
|
- python3-django-ldapdb
|
|
- python3-pip
|
|
- python3-pil
|
|
- python3-crypto
|
|
- python3-git
|
|
- python3-psycopg2
|
|
- ipython3
|
|
- libsasl2-dev
|
|
- libldap2-dev
|
|
- libssl-dev
|
|
- javascript-common
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Install re2o pip3 dependancies
|
|
pip:
|
|
executable: pip3
|
|
name:
|
|
- django-bootstrap3
|
|
- django-macaddress
|
|
|
|
- name: Create re2o directory
|
|
file:
|
|
path: /var/www/re2o
|
|
state: directory
|
|
mode: '2775'
|
|
owner: "{{ re2o.owner }}"
|
|
group: "{{ re2o.group }}"
|
|
|
|
- name: Set ACL for re2o directory
|
|
acl:
|
|
path: /var/www/re2o
|
|
default: true
|
|
entity: nounou
|
|
etype: group
|
|
permissions: rwx
|
|
state: query
|
|
|
|
- name: Clone re2o repository
|
|
git:
|
|
repo: 'http://gitlab.adm.crans.org/nounous/re2o.git'
|
|
dest: /var/www/re2o
|
|
umask: '002'
|
|
version: "{{ re2o.version }}"
|
|
|
|
- name: Set owner of cloned project
|
|
file:
|
|
path: /var/www/re2o
|
|
owner: "{{ re2o.owner }}"
|
|
recurse: true
|
|
|
|
- name: Indicate re2o in motd
|
|
template:
|
|
src: update-motd.d/05-service.j2
|
|
dest: /etc/update-motd.d/05-re2o
|
|
mode: 0755
|
|
|
|
- name: Deploy Re2o settings_local.py
|
|
template:
|
|
src: re2o/settings_local.py.j2
|
|
dest: /var/www/re2o/re2o/settings_local.py
|
|
mode: 0660
|
|
owner: "{{ re2o.settings_local_owner }}"
|
|
group: "{{ re2o.settings_local_group }}"
|