From c1f8496b8d6a5d1c9dab10da65517c2bd16687d0 Mon Sep 17 00:00:00 2001 From: Jordi Ballester Date: Fri, 12 Jan 2018 23:52:26 +0100 Subject: [PATCH] add support for pip install of odoo and addons --- .travis.yml | 14 ++++ README.md | 31 ++++++++- defaults/main.yml | 5 ++ tasks/install.yml | 8 ++- tasks/install_pip.yml | 48 +++++++++++++ templates/odoo-10.0-pip-requirements.txt | 2 + templates/odoo-10.0.conf | 4 ++ templates/odoo-11.0-pip-requirements.txt | 2 + templates/odoo-11.0.conf | 4 ++ templates/odoo-8.0-pip-requirements.txt | 1 + templates/odoo-8.0.conf | 4 ++ templates/odoo-9.0-pip-requirements.txt | 1 + templates/odoo-9.0.conf | 4 ++ templates/odoo-pip.init | 87 ++++++++++++++++++++++++ tests/test_pip.yml | 11 +++ tests/test_pip_changed.yml | 13 ++++ vars/Debian-8_Odoo-10.yml | 23 +++++++ vars/Debian-8_Odoo-8.yml | 24 +++++++ vars/Debian-8_Odoo-9.yml | 23 +++++++ vars/Debian-9_Odoo-10.yml | 22 ++++++ vars/Debian-9_Odoo-11.yml | 23 +++++++ vars/Debian-9_Odoo-8.yml | 22 ++++++ vars/Debian-9_Odoo-9.yml | 22 ++++++ vars/Ubuntu-14_Odoo-10.yml | 23 +++++++ vars/Ubuntu-14_Odoo-8.yml | 23 +++++++ vars/Ubuntu-14_Odoo-9.yml | 23 +++++++ vars/Ubuntu-16_Odoo-10.yml | 23 +++++++ vars/Ubuntu-16_Odoo-11.yml | 24 +++++++ vars/Ubuntu-16_Odoo-8.yml | 23 +++++++ vars/Ubuntu-16_Odoo-9.yml | 23 +++++++ vars/main.yml | 1 + 31 files changed, 558 insertions(+), 3 deletions(-) create mode 100644 tasks/install_pip.yml create mode 100644 templates/odoo-10.0-pip-requirements.txt create mode 100644 templates/odoo-11.0-pip-requirements.txt create mode 100644 templates/odoo-8.0-pip-requirements.txt create mode 100644 templates/odoo-9.0-pip-requirements.txt create mode 100644 templates/odoo-pip.init create mode 100644 tests/test_pip.yml create mode 100644 tests/test_pip_changed.yml diff --git a/.travis.yml b/.travis.yml index dc91fd4..6ab6f94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,48 +7,62 @@ env: # Odoo 8.0 - IMAGE="images:debian/jessie" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/jessie" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/jessie" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 9.0 - IMAGE="images:debian/jessie" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/jessie" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/jessie" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 10.0 - IMAGE="images:debian/jessie" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/jessie" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/jessie" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Debian 9 (stretch) # Odoo 8.0 - IMAGE="images:debian/stretch" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/stretch" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/stretch" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 9.0 - IMAGE="images:debian/stretch" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/stretch" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/stretch" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 10.0 - IMAGE="images:debian/stretch" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/stretch" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/stretch" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 11.0 - IMAGE="images:debian/stretch" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="images:debian/stretch" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="images:debian/stretch" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Ubuntu 14.04 (trusty) # Odoo 8.0 - IMAGE="ubuntu:trusty" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:trusty" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:trusty" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 9.0 - IMAGE="ubuntu:trusty" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:trusty" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:trusty" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 10.0 - IMAGE="ubuntu:trusty" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:trusty" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:trusty" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Ubuntu 16.04 (xenial) # Odoo 8.0 - IMAGE="ubuntu:xenial" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:xenial" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:xenial" ODOO_VERSION=8.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 9.0 - IMAGE="ubuntu:xenial" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:xenial" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:xenial" ODOO_VERSION=9.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 10.0 - IMAGE="ubuntu:xenial" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:xenial" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:xenial" ODOO_VERSION=10.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" # Odoo 11.0 - IMAGE="ubuntu:xenial" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=standard ANSIBLE_VERSION="2.4,<2.5" - IMAGE="ubuntu:xenial" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=buildout ANSIBLE_VERSION="2.4,<2.5" + - IMAGE="ubuntu:xenial" ODOO_VERSION=11.0 ODOO_INSTALL_TYPE=pip ANSIBLE_VERSION="2.4,<2.5" install: # Spawn a LXD container diff --git a/README.md b/README.md index 4d73ddc..ae8a54d 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,19 @@ # Odoo [![Build Status](https://travis-ci.org/osiell/ansible-odoo.png)](https://travis-ci.org/osiell/ansible-odoo) -Ansible role to install Odoo from a Git or Mercurial repository, +Ansible role to install Odoo from a Git or Mercurial repository, or from pip, and configure it. -This role supports two types of installation: +This role supports three types of installation: * **standard**: install the Odoo dependencies from APT repositories and the Odoo project from a Git/Hg repository. Odoo is configured with Ansible options (`odoo_config_*` ones). +* **pip**: install the Odoo dependencies from APT repositories and the +Odoo project and modules from a pip requirements.txt file. Odoo is configured +with Ansible options +(`odoo_config_*` ones). + * **buildout**: build the Odoo project from a Git/Hg repository containing a Buildout configuration file based on the [anybox.recipe.odoo](https://pypi.python.org/pypi/anybox.recipe.odoo/) recipe. @@ -101,6 +106,28 @@ Here we set some options required by the ``connector`` framework: odoo_config_workers: 8 ``` +### odoo_install_type: pip + +Pip installation (assuming that PostgreSQL is installed and running on +the same host). We need to ensure that the environment variable LC_ALL is used +if Odoo version 11 is to be used: + +```yaml +- name: Odoo + hosts: odoo_server + become: yes + roles: + - role: odoo + odoo_install_type: pip + odoo_version: 11.0 + odoo_pip_requirements_url: https://raw.githubusercontent.com/OCA/sample-oca-pip-requirements/11.0/requirements.txt + odoo_config_admin_passwd: SuPerPassWorD + environment: + LC_ALL: en_US.UTF-8 + +``` + + ### odoo_install_type: buildout With a Buildout installation type, Odoo is installed and configured directly diff --git a/defaults/main.yml b/defaults/main.yml index fcc9e34..c66356c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -105,6 +105,11 @@ odoo_config_custom: {} #your_option1: value1 #your_option2: value2 +# Pip installation options (odoo_install_type == 'pip') +odoo_pip_venv_path: "{{ odoo_workdir }}/sandbox" +odoo_pip_requirements_url: "file:///home/{{ odoo_user }}/requirements.txt" +odoo_pip_odoo_bin_path: "{{ odoo_workdir }}/sandbox/src/odoo/odoo-bin" + # Buildout installation options (odoo_install_type == 'buildout') odoo_buildout_version: 2.9.5 odoo_buildout_venv_path: "{{ odoo_workdir }}/sandbox" diff --git a/tasks/install.yml b/tasks/install.yml index 835dae2..55271ff 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -49,7 +49,7 @@ update={{ project_path.stat.exists == False and 'yes' or (odoo_repo_update and 'yes' or 'no') }} depth={{ odoo_repo_depth }} - when: odoo_repo_type == 'git' and odoo_repo_url + when: odoo_install_type != 'pip' and odoo_repo_type == 'git' and odoo_repo_url notify: Restart Odoo tags: - odoo_project @@ -66,6 +66,12 @@ tags: - odoo_install_type_buildout +- name: Pip installation + import_tasks: install_pip.yml + when: odoo_install_type == 'pip' + tags: + - odoo_install_type_pip + - name: Install NPM packages import_tasks: install_npm.yml when: (odoo_version | int) >= 9 diff --git a/tasks/install_pip.yml b/tasks/install_pip.yml new file mode 100644 index 0000000..98c6da4 --- /dev/null +++ b/tasks/install_pip.yml @@ -0,0 +1,48 @@ +--- + +- name: Generate sample requirements.txt file + template: src=odoo-{{ odoo_version }}-pip-requirements.txt dest="/home/{{ odoo_user }}/requirements.txt" + owner={{ odoo_user }} group={{ odoo_user }} mode=0600 + +- name: Install build dependencies + apt: pkg={{ item }} + state=installed + update_cache={{ odoo_apt_update_cache }} + cache_valid_time={{ odoo_apt_cache_valid_time }} + with_items: "{{ odoo_pip_build_dependencies }}" + +- name: Prepare the Python virtual environment + become: yes + become_user: "{{ odoo_user }}" + shell: "{{ odoo_pip_venv_cmd }}" + args: + creates: "{{ odoo_pip_venv_path }}" + +- name: Download the pip requirements file + get_url: url="{{ odoo_pip_requirements_url }}" + force=yes + dest="/home/{{ odoo_user }}/requirements.txt" + +- name: Install Odoo dependencies (PyPi) + pip: + name: "{{ item }}" + virtualenv: "{{ odoo_pip_venv_path }}" + with_items: "{{ odoo_pip_dependencies }}" + +- name: Install Odoo from pip external requirements file + pip: + requirements: /home/{{ odoo_user }}/requirements.txt + extra_args: --upgrade + virtualenv: "{{ odoo_pip_venv_path }}" + + +- import_tasks: config.yml + tags: + - odoo_config + +- name: Generate Odoo init script + template: src=odoo-pip.init dest=/etc/init.d/{{ odoo_service }} + owner=root group=root mode=0755 + force={{ odoo_force_config and 'yes' or 'no' }} + backup=yes + notify: Restart Odoo diff --git a/templates/odoo-10.0-pip-requirements.txt b/templates/odoo-10.0-pip-requirements.txt new file mode 100644 index 0000000..a91390c --- /dev/null +++ b/templates/odoo-10.0-pip-requirements.txt @@ -0,0 +1,2 @@ +https://github.com/odoo/odoo/archive/10.0.tar.gz#egg=odoo +-e git+https://github.com/OCA/server-tools.git@10.0#egg=odoo10_addon_date_range&subdirectory=setup/date_range diff --git a/templates/odoo-10.0.conf b/templates/odoo-10.0.conf index 2af2e5d..88cd16a 100644 --- a/templates/odoo-10.0.conf +++ b/templates/odoo-10.0.conf @@ -1,5 +1,9 @@ [options] +{% if odoo_install_type == 'pip' %} +addons_path = +{% else %} addons_path = {{ odoo_config_addons_path.__class__.__name__ == 'list' and odoo_config_addons_path | join(',') or odoo_config_addons_path }} +{% endif %} admin_passwd = {{ odoo_config_admin_passwd }} csv_internal_sep = {{ odoo_config_csv_internal_sep }} data_dir = {{ odoo_config_data_dir }} diff --git a/templates/odoo-11.0-pip-requirements.txt b/templates/odoo-11.0-pip-requirements.txt new file mode 100644 index 0000000..2e4ae58 --- /dev/null +++ b/templates/odoo-11.0-pip-requirements.txt @@ -0,0 +1,2 @@ +https://github.com/odoo/odoo/archive/11.0.tar.gz#egg=odoo +-e git+https://github.com/OCA/server-ux.git@11.0#egg=odoo11_addon_date_range&subdirectory=setup/date_range diff --git a/templates/odoo-11.0.conf b/templates/odoo-11.0.conf index 8159125..bf2ff64 100644 --- a/templates/odoo-11.0.conf +++ b/templates/odoo-11.0.conf @@ -1,5 +1,9 @@ [options] +{% if odoo_install_type == 'pip' %} +addons_path = +{% else %} addons_path = {{ odoo_config_addons_path.__class__.__name__ == 'list' and odoo_config_addons_path | join(',') or odoo_config_addons_path }} +{% endif %} admin_passwd = {{ odoo_config_admin_passwd }} csv_internal_sep = {{ odoo_config_csv_internal_sep }} data_dir = {{ odoo_config_data_dir }} diff --git a/templates/odoo-8.0-pip-requirements.txt b/templates/odoo-8.0-pip-requirements.txt new file mode 100644 index 0000000..db5c32c --- /dev/null +++ b/templates/odoo-8.0-pip-requirements.txt @@ -0,0 +1 @@ +https://github.com/odoo/odoo/archive/8.0.tar.gz#egg=odoo diff --git a/templates/odoo-8.0.conf b/templates/odoo-8.0.conf index 9850dc6..b7f1fc7 100644 --- a/templates/odoo-8.0.conf +++ b/templates/odoo-8.0.conf @@ -1,5 +1,9 @@ [options] +{% if odoo_install_type == 'pip' %} +addons_path = +{% else %} addons_path = {{ odoo_config_addons_path.__class__.__name__ == 'list' and odoo_config_addons_path | join(',') or odoo_config_addons_path }} +{% endif %} admin_passwd = {{ odoo_config_admin_passwd }} auto_reload = {{ odoo_config_auto_reload }} csv_internal_sep = {{ odoo_config_csv_internal_sep }} diff --git a/templates/odoo-9.0-pip-requirements.txt b/templates/odoo-9.0-pip-requirements.txt new file mode 100644 index 0000000..3058eb2 --- /dev/null +++ b/templates/odoo-9.0-pip-requirements.txt @@ -0,0 +1 @@ +https://github.com/odoo/odoo/archive/9.0.tar.gz#egg=odoo diff --git a/templates/odoo-9.0.conf b/templates/odoo-9.0.conf index 2eba5f8..dfc21eb 100644 --- a/templates/odoo-9.0.conf +++ b/templates/odoo-9.0.conf @@ -1,5 +1,9 @@ [options] +{% if odoo_install_type == 'pip' %} +addons_path = +{% else %} addons_path = {{ odoo_config_addons_path.__class__.__name__ == 'list' and odoo_config_addons_path | join(',') or odoo_config_addons_path }} +{% endif %} admin_passwd = {{ odoo_config_admin_passwd }} csv_internal_sep = {{ odoo_config_csv_internal_sep }} data_dir = {{ odoo_config_data_dir }} diff --git a/templates/odoo-pip.init b/templates/odoo-pip.init new file mode 100644 index 0000000..6048aa3 --- /dev/null +++ b/templates/odoo-pip.init @@ -0,0 +1,87 @@ +#!/bin/bash +### BEGIN INIT INFO +# Provides: {{ odoo_service }} +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $network +# Should-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start odoo daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO +## more info: http://wiki.debian.org/LSBInitScripts + +. /lib/lsb/init-functions + +PATH=/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin +WORKDIR={{ odoo_workdir }} +VIRTUALENV={{ odoo_pip_venv_path }} +DAEMON={{ odoo_pip_odoo_bin_path }} +NAME={{ odoo_service }} +DESC={{ odoo_service }} +LOGFILE={{ odoo_logdir }}/{{ odoo_service }}.log +PIDFILE=/var/run/${NAME}.pid +USER={{ odoo_user }} +export LOGNAME=$USER +{% if odoo_init_env %} +# Custom environment variables +{% for name, value in odoo_init_env.iteritems() %} +export {{ name }}={{ value }} +{% endfor %} +{% endif %} + +test -x $DAEMON || exit 0 +set -e + +function _start() { + . $VIRTUALENV/bin/activate + # '--load' is used here as Odoo ignores the 'server_wide_modules' option + # from the configuration file + # Odoo: https://github.com/odoo/odoo/pull/13685 + # OCB: https://github.com/OCA/OCB/pull/553 + start-stop-daemon --chdir=${WORKDIR} --start --quiet --pidfile $PIDFILE --chuid $USER:$USER --background --make-pidfile --exec $DAEMON -- --logfile $LOGFILE{{ odoo_config_server_wide_modules not in [False, 'None', ''] and ' --load=%s' % odoo_config_server_wide_modules or '' }} +} + +function _stop() { + start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --retry 3 + rm -f $PIDFILE +} + +function _status() { + start-stop-daemon --status --quiet --pidfile $PIDFILE + return $? +} + + +case "$1" in + start) + echo -n "Starting $DESC: " + _start + echo "ok" + ;; + stop) + echo -n "Stopping $DESC: " + _stop + echo "ok" + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + _stop + sleep 1 + _start + echo "ok" + ;; + status) + echo -n "Status of $DESC: " + _status && echo "running" || echo "stopped" + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 + diff --git a/tests/test_pip.yml b/tests/test_pip.yml new file mode 100644 index 0000000..709bb57 --- /dev/null +++ b/tests/test_pip.yml @@ -0,0 +1,11 @@ +--- + +- hosts: localhost + become: yes + roles: + - ansible-odoo + vars: + odoo_install_type: pip + odoo_service: odoo-pip + environment: + LC_ALL: en_US.UTF-8 diff --git a/tests/test_pip_changed.yml b/tests/test_pip_changed.yml new file mode 100644 index 0000000..4696b71 --- /dev/null +++ b/tests/test_pip_changed.yml @@ -0,0 +1,13 @@ +--- + +- hosts: localhost + become: yes + roles: + - ansible-odoo + vars: + odoo_install_type: pip + odoo_service: odoo-pip + odoo_init_env: + CHANGED_TEST: 1 + environment: + LC_ALL: en_US.UTF-8 diff --git a/vars/Debian-8_Odoo-10.yml b/vars/Debian-8_Odoo-10.yml index 9618a9a..0436f50 100644 --- a/vars/Debian-8_Odoo-10.yml +++ b/vars/Debian-8_Odoo-10.yml @@ -52,6 +52,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Debian-8_Odoo-8.yml b/vars/Debian-8_Odoo-8.yml index c6870ee..5e05eb9 100644 --- a/vars/Debian-8_Odoo-8.yml +++ b/vars/Debian-8_Odoo-8.yml @@ -39,6 +39,30 @@ odoo_debian_packages: odoo_npm_packages: [] +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Debian-8_Odoo-9.yml b/vars/Debian-8_Odoo-9.yml index 37a0301..a9338b2 100644 --- a/vars/Debian-8_Odoo-9.yml +++ b/vars/Debian-8_Odoo-9.yml @@ -47,6 +47,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Debian-9_Odoo-10.yml b/vars/Debian-9_Odoo-10.yml index a51592a..d6bf487 100644 --- a/vars/Debian-9_Odoo-10.yml +++ b/vars/Debian-9_Odoo-10.yml @@ -52,6 +52,28 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Debian-9_Odoo-11.yml b/vars/Debian-9_Odoo-11.yml index 71100ab..d18ece0 100644 --- a/vars/Debian-9_Odoo-11.yml +++ b/vars/Debian-9_Odoo-11.yml @@ -49,6 +49,28 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - wrapt + - setuptools-odoo + - odoo-autodiscover + +odoo_pip_build_dependencies: + - python3-virtualenv + - build-essential + - python3-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python3-virtualenv - build-essential @@ -66,6 +88,7 @@ odoo_buildout_build_dependencies: - libwebp-dev odoo_buildout_venv_cmd: "python3 -m virtualenv --no-setuptools --python=python3 {{ odoo_buildout_venv_path }}" +odoo_pip_venv_cmd: "python3 -m virtualenv --python=python3 {{ odoo_pip_venv_path }}" odoo_wkhtmltox_depends: - fontconfig diff --git a/vars/Debian-9_Odoo-8.yml b/vars/Debian-9_Odoo-8.yml index 1b2aa11..d4d8897 100644 --- a/vars/Debian-9_Odoo-8.yml +++ b/vars/Debian-9_Odoo-8.yml @@ -39,6 +39,28 @@ odoo_debian_packages: odoo_npm_packages: [] +odoo_pip_dependencies: + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Debian-9_Odoo-9.yml b/vars/Debian-9_Odoo-9.yml index 0080f65..1dcbf9a 100644 --- a/vars/Debian-9_Odoo-9.yml +++ b/vars/Debian-9_Odoo-9.yml @@ -48,6 +48,28 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg62-turbo-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Ubuntu-14_Odoo-10.yml b/vars/Ubuntu-14_Odoo-10.yml index 89efcd4..f04cb18 100644 --- a/vars/Ubuntu-14_Odoo-10.yml +++ b/vars/Ubuntu-14_Odoo-10.yml @@ -52,6 +52,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjpeg-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Ubuntu-14_Odoo-8.yml b/vars/Ubuntu-14_Odoo-8.yml index 1958b7a..885fb12 100644 --- a/vars/Ubuntu-14_Odoo-8.yml +++ b/vars/Ubuntu-14_Odoo-8.yml @@ -37,6 +37,29 @@ odoo_debian_packages: - python-babel - python-gevent +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjpeg-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Ubuntu-14_Odoo-9.yml b/vars/Ubuntu-14_Odoo-9.yml index 2717a33..4982916 100644 --- a/vars/Ubuntu-14_Odoo-9.yml +++ b/vars/Ubuntu-14_Odoo-9.yml @@ -47,6 +47,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjpeg-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Ubuntu-16_Odoo-10.yml b/vars/Ubuntu-16_Odoo-10.yml index b4e83f5..ad4f9c0 100644 --- a/vars/Ubuntu-16_Odoo-10.yml +++ b/vars/Ubuntu-16_Odoo-10.yml @@ -52,6 +52,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Ubuntu-16_Odoo-11.yml b/vars/Ubuntu-16_Odoo-11.yml index 2c5f1f6..ca2c9b5 100644 --- a/vars/Ubuntu-16_Odoo-11.yml +++ b/vars/Ubuntu-16_Odoo-11.yml @@ -56,6 +56,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover + - setuptools-odoo + +odoo_pip_build_dependencies: + - python3-virtualenv + - build-essential + - python3-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python3-virtualenv - build-essential @@ -87,6 +110,7 @@ odoo_wkhtmltox_depends: - libjpeg-turbo8 odoo_buildout_venv_cmd: "virtualenv --no-setuptools --python=python3 {{ odoo_buildout_venv_path }}" +odoo_pip_venv_cmd: "virtualenv --python=python3 {{ odoo_pip_venv_path }}" # Try Trusty's package if Xenial one is not found odoo_wkhtmltox_urls: diff --git a/vars/Ubuntu-16_Odoo-8.yml b/vars/Ubuntu-16_Odoo-8.yml index 09860e3..48810de 100644 --- a/vars/Ubuntu-16_Odoo-8.yml +++ b/vars/Ubuntu-16_Odoo-8.yml @@ -37,6 +37,29 @@ odoo_debian_packages: - python-babel - python-gevent +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/Ubuntu-16_Odoo-9.yml b/vars/Ubuntu-16_Odoo-9.yml index 911601e..6282c08 100644 --- a/vars/Ubuntu-16_Odoo-9.yml +++ b/vars/Ubuntu-16_Odoo-9.yml @@ -47,6 +47,29 @@ odoo_npm_packages: - name: phantomjs-prebuilt version: 2.1.15 +odoo_pip_dependencies: + - pip==9.0.1 + - wrapt + - odoo-autodiscover==2.0.0 + - setuptools-odoo==2.0.2.post1 + +odoo_pip_build_dependencies: + - python-virtualenv + - build-essential + - python-dev + - libxml2-dev + - libxslt1-dev + - libpq-dev + - libldap2-dev + - libsasl2-dev + - libopenjp2-7-dev + - libjpeg-turbo8-dev + - libtiff5-dev + - libfreetype6-dev + - liblcms2-dev + - libwebp-dev + - libssl-dev + odoo_buildout_build_dependencies: - python-virtualenv - build-essential diff --git a/vars/main.yml b/vars/main.yml index 7437d9e..861c706 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -14,6 +14,7 @@ odoo_pypi_packages: - psycogreen odoo_buildout_venv_cmd: "virtualenv --no-setuptools {{ odoo_buildout_venv_path }}" +odoo_pip_venv_cmd: "virtualenv {{ odoo_pip_venv_path }}" odoo_wkhtmltox_urls: - https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/{{ odoo_wkhtmltox_version }}/wkhtmltox-{{ odoo_wkhtmltox_version }}_linux-{{ ansible_distribution_release }}-{{ odoo_debian_arch }}.deb