install only on python 3 (#41244)

This commit is contained in:
Emmanuel Cazenave 2020-04-02 08:35:40 +02:00
parent 4716626991
commit cb1616d826
4 changed files with 19 additions and 60 deletions

View File

@ -3,11 +3,8 @@
tasks:
- name: delete python venvs
file:
path: "{{item}}"
path: "{{venv_py3}}"
state: absent
loop:
- "{{venv}}"
- "{{venv_py3}}"
- name: delete app /var/lib directory
file:

View File

@ -17,16 +17,11 @@
- make
- nginx
- postgresql
- python-apt
- python3-apt
- python-dev
- python3-dev
- python-lasso
- python3-lasso
- python-pip
- python-psycopg2
- python3-psycopg2
- python-virtualenv
- python3-pip
- rabbitmq-server
- sassc
- supervisor
@ -46,27 +41,18 @@
pip:
name: django
version: "{{django_version}}"
virtualenv: "{{item.venv}}"
virtualenv_python: "{{item.venv_python}}"
loop:
- { venv: '{{venv}}', venv_python: 'python2' }
- { venv: '{{venv_py3}}', venv_python: 'python3' }
virtualenv: "{{venv_py3}}"
virtualenv_python: "python3"
- name: install django-debug-toolbar
pip:
name: django-debug-toolbar
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: install psycopg2-binary
pip:
name: psycopg2-binary
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: "create {{src_dir}} directory"
file:
@ -77,7 +63,7 @@
- name: "create misc directory"
file:
path: "{{venv}}/misc"
path: "{{venv_py3}}/misc"
state: directory
- name: "create conf directory"
@ -93,20 +79,14 @@
- name: create getlasso scripts
template:
src: getlasso.j2
dest: "{{item.dest}}/getlasso.sh"
dest: "{{venv_py3_bin}}/getlasso.sh"
mode: "u=rwx,g=rx,o=rx"
vars:
virtualenv_python: "{{item.vp}}"
system_python: "{{item.sp}}"
loop:
- { vp: '{{venv_python}}', sp: '/usr/bin/python', dest: '{{venv_bin}}' }
- { vp: '{{venv_py3_python}}', sp: '/usr/bin/python3', dest: '{{venv_py3_bin}}' }
virtualenv_python: "{{venv_py3_python}}"
system_python: "/usr/bin/python3"
- name: execute getlasso
command: "{{item}}/getlasso.sh"
loop:
- "{{venv_bin}}"
- "{{venv_py3_bin}}"
command: "{{venv_py3_bin}}/getlasso.sh"
- name: source install eopayment
include_tasks: install_source.yml
@ -120,48 +100,33 @@
vars:
repo: "debian/django-tenant-schemas"
repo_dir: "{{ src_dir }}/django-tenant-schemas"
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: source install django-mellon
include_tasks: install_source.yml
vars:
repo: "django-mellon"
repo_dir: "{{ src_dir }}/django-mellon"
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: source install gadjo
include_tasks: install_source.yml
vars:
repo: "gadjo"
repo_dir: "{{ src_dir }}/gadjo"
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: install python-memcached
pip:
name: python-memcached
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: source install django-ckeditor
include_tasks: install_source.yml
vars:
repo: "debian/django-ckeditor"
repo_dir: "{{ src_dir }}/django-ckeditor"
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: install theme
import_tasks: tasks/install_theme.yml

View File

@ -3,10 +3,7 @@
vars:
repo: "hobo"
repo_dir: "{{ src_dir }}/hobo"
virtualenv: "{{item}}"
loop:
- "{{venv}}"
- "{{venv_py3}}"
virtualenv: "{{venv_py3}}"
- name: hobo app setup
import_role:

View File

@ -3,11 +3,11 @@
- name: copy wcs requirements.txt
copy:
src: requirements.txt
dest: "{{venv}}/misc/wcs_requirements.txt"
dest: "{{venv_py3}}/misc/wcs_requirements.txt"
- name: pip install requirements for wcs
pip:
requirements: "{{venv}}/misc/wcs_requirements.txt"
requirements: "{{venv_py3}}/misc/wcs_requirements.txt"
virtualenv: "{{virtualenv}}"
- name: source install wcs