2018-01-09 14:30:23 +01:00
|
|
|
---
|
2018-11-21 18:43:33 +01:00
|
|
|
- name: Install system packages dependencies
|
2018-01-09 14:30:23 +01:00
|
|
|
apt:
|
2019-02-13 16:11:56 +01:00
|
|
|
name:
|
2019-01-03 16:12:17 +01:00
|
|
|
- acl
|
2018-11-21 18:43:33 +01:00
|
|
|
- gettext
|
|
|
|
- graphicsmagick
|
|
|
|
- graphviz
|
2018-01-26 12:14:09 +01:00
|
|
|
- inkscape
|
2018-11-21 18:43:33 +01:00
|
|
|
- libjs-leaflet
|
2018-01-09 14:30:23 +01:00
|
|
|
- libldap2-dev
|
2019-10-07 17:28:37 +02:00
|
|
|
- libmagic1
|
2019-10-03 12:44:51 +02:00
|
|
|
- libpq-dev
|
2018-12-13 14:57:06 +01:00
|
|
|
- libreoffice
|
2018-01-09 14:30:23 +01:00
|
|
|
- libsasl2-dev
|
|
|
|
- libssl-dev
|
2021-04-13 16:55:47 +02:00
|
|
|
- libsystemd-dev
|
2018-01-26 12:14:09 +01:00
|
|
|
- make
|
2021-04-13 16:55:47 +02:00
|
|
|
- memcached
|
2018-01-09 14:30:23 +01:00
|
|
|
- nginx
|
2021-04-13 16:55:47 +02:00
|
|
|
- pkg-config
|
2018-11-21 18:43:33 +01:00
|
|
|
- postgresql
|
2019-10-03 12:44:51 +02:00
|
|
|
- python3-apt
|
|
|
|
- python3-dev
|
2019-12-23 14:43:53 +01:00
|
|
|
- python3-lasso
|
2020-04-02 08:35:40 +02:00
|
|
|
- python3-pip
|
2021-04-13 16:55:47 +02:00
|
|
|
- python3-psycopg2
|
|
|
|
- python3-uwsgidecorators
|
2018-01-09 14:30:23 +01:00
|
|
|
- rabbitmq-server
|
2019-09-25 16:30:16 +02:00
|
|
|
- sassc
|
2018-01-09 14:30:23 +01:00
|
|
|
- supervisor
|
2021-03-31 16:22:35 +02:00
|
|
|
- uwsgi
|
|
|
|
- uwsgi-plugin-python3
|
2021-04-13 16:55:47 +02:00
|
|
|
- virtualenv
|
2019-02-13 16:11:56 +01:00
|
|
|
state: present
|
2018-01-09 14:30:23 +01:00
|
|
|
become: yes
|
|
|
|
|
2018-02-09 11:30:48 +01:00
|
|
|
- name: "create the postgresql user named {{user}}"
|
|
|
|
postgresql_user:
|
|
|
|
name: "{{user}}"
|
2020-10-07 16:41:14 +02:00
|
|
|
role_attr_flags: SUPERUSER,LOGIN
|
2019-11-25 16:12:46 +01:00
|
|
|
port: "{{postgresql_port}}"
|
|
|
|
|
2018-11-21 18:43:33 +01:00
|
|
|
become: yes
|
|
|
|
become_user: postgres
|
2018-02-09 11:30:48 +01:00
|
|
|
|
2020-04-02 08:52:23 +02:00
|
|
|
- name: clean the virtualenv
|
|
|
|
file:
|
|
|
|
path: "{{venv_py3}}"
|
|
|
|
state: absent
|
|
|
|
when: clean_venv
|
|
|
|
|
2019-11-26 17:51:35 +01:00
|
|
|
- name: create the virtualenvs and install django
|
2018-01-09 14:30:23 +01:00
|
|
|
pip:
|
|
|
|
name: django
|
2018-02-20 17:38:33 +01:00
|
|
|
version: "{{django_version}}"
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
|
|
|
virtualenv_python: "python3"
|
2018-01-09 14:30:23 +01:00
|
|
|
|
2019-09-27 19:59:53 +02:00
|
|
|
- name: install django-debug-toolbar
|
|
|
|
pip:
|
2020-09-21 15:47:50 +02:00
|
|
|
name: "django-debug-toolbar<3"
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2019-09-27 19:59:53 +02:00
|
|
|
|
2021-08-17 11:24:06 +02:00
|
|
|
- name: install pytest
|
|
|
|
pip:
|
|
|
|
name: pytest
|
|
|
|
virtualenv: "{{venv_py3}}"
|
|
|
|
|
2018-01-25 12:50:30 +01:00
|
|
|
- name: "create {{src_dir}} directory"
|
|
|
|
file:
|
|
|
|
path: "{{src_dir}}"
|
|
|
|
state: directory
|
|
|
|
owner: "{{user}}"
|
|
|
|
group: "{{user}}"
|
2018-01-31 11:27:38 +01:00
|
|
|
|
|
|
|
- name: "create misc directory"
|
|
|
|
file:
|
2020-04-02 08:35:40 +02:00
|
|
|
path: "{{venv_py3}}/misc"
|
2018-01-31 11:27:38 +01:00
|
|
|
state: directory
|
|
|
|
|
2018-11-16 08:28:53 +01:00
|
|
|
- name: "create conf directory"
|
|
|
|
file:
|
|
|
|
path: "{{publik_conf}}"
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: "create settings directory"
|
|
|
|
file:
|
|
|
|
path: "{{publik_settings}}"
|
|
|
|
state: directory
|
2018-01-31 11:27:38 +01:00
|
|
|
|
2021-07-15 13:10:59 +02:00
|
|
|
- name: "create base run directory"
|
|
|
|
file:
|
|
|
|
path: "{{base_run_dir}}"
|
|
|
|
state: directory
|
|
|
|
|
2019-11-26 17:51:35 +01:00
|
|
|
- name: create getlasso scripts
|
2018-01-09 14:30:23 +01:00
|
|
|
template:
|
|
|
|
src: getlasso.j2
|
2020-04-02 08:35:40 +02:00
|
|
|
dest: "{{venv_py3_bin}}/getlasso.sh"
|
2018-01-09 14:30:23 +01:00
|
|
|
mode: "u=rwx,g=rx,o=rx"
|
2019-11-26 17:51:35 +01:00
|
|
|
vars:
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv_python: "{{venv_py3_python}}"
|
|
|
|
system_python: "/usr/bin/python3"
|
2018-01-09 14:30:23 +01:00
|
|
|
|
|
|
|
- name: execute getlasso
|
2020-04-02 08:35:40 +02:00
|
|
|
command: "{{venv_py3_bin}}/getlasso.sh"
|
2018-01-26 12:14:09 +01:00
|
|
|
|
2021-10-06 12:33:01 +02:00
|
|
|
- name: clean psycopg2 pip installation
|
|
|
|
ansible.builtin.pip:
|
|
|
|
name:
|
|
|
|
- psycopg2-binary
|
|
|
|
- psycopg2
|
|
|
|
state: absent
|
|
|
|
virtualenv: "{{venv_py3}}"
|
|
|
|
|
|
|
|
- name: create getpsycopg2 scripts
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: getpsycopg2.j2
|
|
|
|
dest: "{{venv_py3_bin}}/getpsycopg2.sh"
|
|
|
|
mode: "u=rwx,g=rx,o=rx"
|
|
|
|
vars:
|
|
|
|
virtualenv_python: "{{venv_py3_python}}"
|
|
|
|
|
|
|
|
- name: execute getpsycopg2
|
|
|
|
ansible.builtin.command: "{{venv_py3_bin}}/getpsycopg2.sh"
|
|
|
|
|
2021-03-31 16:22:35 +02:00
|
|
|
- name: create get-uwsgidecorators scripts
|
|
|
|
template:
|
|
|
|
src: get-uwsgidecorators.j2
|
|
|
|
dest: "{{venv_py3_bin}}/get-uwsgidecorators.sh"
|
|
|
|
mode: "u=rwx,g=rx,o=rx"
|
|
|
|
vars:
|
|
|
|
virtualenv_python: "{{venv_py3_python}}"
|
|
|
|
system_python: "/usr/bin/python3"
|
|
|
|
|
|
|
|
- name: execute get-uwsgidecorators
|
|
|
|
command: "{{venv_py3_bin}}/get-uwsgidecorators.sh"
|
|
|
|
|
2018-03-30 14:30:44 +02:00
|
|
|
- name: source install eopayment
|
2019-11-26 17:51:35 +01:00
|
|
|
include_tasks: install_source.yml
|
2018-03-30 14:30:44 +02:00
|
|
|
vars:
|
|
|
|
repo: "eopayment"
|
|
|
|
repo_dir: "{{ src_dir }}/eopayment"
|
2019-11-26 17:51:35 +01:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2018-03-30 14:30:44 +02:00
|
|
|
|
2019-11-26 17:15:14 +01:00
|
|
|
- name: source install django-tenant-schemas
|
2019-11-26 17:51:35 +01:00
|
|
|
include_tasks: install_source.yml
|
2019-11-26 17:15:14 +01:00
|
|
|
vars:
|
|
|
|
repo: "debian/django-tenant-schemas"
|
|
|
|
repo_dir: "{{ src_dir }}/django-tenant-schemas"
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2019-11-26 17:15:14 +01:00
|
|
|
|
|
|
|
- name: source install django-mellon
|
2019-11-26 17:51:35 +01:00
|
|
|
include_tasks: install_source.yml
|
2019-11-26 17:15:14 +01:00
|
|
|
vars:
|
|
|
|
repo: "django-mellon"
|
|
|
|
repo_dir: "{{ src_dir }}/django-mellon"
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2019-11-26 17:15:14 +01:00
|
|
|
|
|
|
|
- name: source install gadjo
|
2019-11-26 17:51:35 +01:00
|
|
|
include_tasks: install_source.yml
|
2019-11-26 17:15:14 +01:00
|
|
|
vars:
|
|
|
|
repo: "gadjo"
|
|
|
|
repo_dir: "{{ src_dir }}/gadjo"
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2019-11-26 17:15:14 +01:00
|
|
|
|
|
|
|
- name: install python-memcached
|
|
|
|
pip:
|
|
|
|
name: python-memcached
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2019-11-26 17:15:14 +01:00
|
|
|
|
|
|
|
- name: source install django-ckeditor
|
2019-11-26 17:51:35 +01:00
|
|
|
include_tasks: install_source.yml
|
2019-11-26 17:15:14 +01:00
|
|
|
vars:
|
|
|
|
repo: "debian/django-ckeditor"
|
|
|
|
repo_dir: "{{ src_dir }}/django-ckeditor"
|
2020-04-02 08:35:40 +02:00
|
|
|
virtualenv: "{{venv_py3}}"
|
2019-11-26 17:15:14 +01:00
|
|
|
|
2018-11-28 19:24:58 +01:00
|
|
|
- name: install theme
|
|
|
|
import_tasks: tasks/install_theme.yml
|
|
|
|
vars:
|
|
|
|
src_theme_dir: "{{src_dir}}/{{theme_repo}}"
|
|
|
|
tags:
|
|
|
|
- theme
|
2018-11-15 11:24:03 +01:00
|
|
|
|
|
|
|
- name: create cert directory
|
|
|
|
file:
|
2020-04-07 06:05:46 +02:00
|
|
|
path: "{{certs_dir}}"
|
2018-11-15 11:24:03 +01:00
|
|
|
state: directory
|
2020-04-07 06:05:46 +02:00
|
|
|
become: yes
|
2018-11-15 11:24:03 +01:00
|
|
|
tags:
|
|
|
|
- tls
|
|
|
|
|
|
|
|
- name: Download fullchain.pem
|
|
|
|
get_url:
|
|
|
|
url: https://doc-publik.entrouvert.com/media/certificates/dev.publik.love/fullchain.pem
|
2020-04-07 06:05:46 +02:00
|
|
|
dest: "{{certs_dir}}/dev.publik.love-fullchain.pem"
|
2019-02-05 14:57:55 +01:00
|
|
|
force: yes
|
2020-04-07 06:05:46 +02:00
|
|
|
become: yes
|
2018-11-15 11:24:03 +01:00
|
|
|
tags:
|
|
|
|
- tls
|
|
|
|
|
|
|
|
- name: Download privkey.pem
|
|
|
|
get_url:
|
|
|
|
url: https://doc-publik.entrouvert.com/media/certificates/dev.publik.love/privkey.pem
|
2020-04-07 06:05:46 +02:00
|
|
|
dest: "{{certs_dir}}/dev.publik.love-privkey.pem"
|
2019-02-05 14:57:55 +01:00
|
|
|
force: yes
|
2020-04-07 06:05:46 +02:00
|
|
|
become: yes
|
2018-11-15 11:24:03 +01:00
|
|
|
tags:
|
|
|
|
- tls
|