• Stars
    star
    106
  • Rank 318,638 (Top 7 %)
  • Language
    Shell
  • License
    GNU General Publi...
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ansible role for Odoo

Odoo Build Status

Ansible role to install Odoo from a Git or Mercurial repository, or from pip, and configure it.

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 Odoo and its dependencies (modules and Python packages) 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 recipe. Odoo and its dependencies are then installed and executed inside a Python virtual environment. The configuration part is also managed by Buildout (odoo_config_* options are not used excepting the odoo_config_db_* ones for PostgreSQL related tasks).

Minimum Ansible Version: 2.4

Supported versions and systems

System / Odoo 8.0 9.0 10.0 11.0
Debian 8 yes yes yes -
Debian 9 yes yes yes yes
Ubuntu 14.04 yes yes yes -
Ubuntu 16.04 yes yes yes yes

Example (Playbook)

odoo_install_type: standard (default)

Standard installation (assuming that PostgreSQL is installed and running on the same host):

- name: Odoo
  hosts: odoo_server
  become: yes
  roles:
    - role: odoo
      odoo_version: 11.0
      odoo_config_admin_passwd: SuPerPassWorD

With the standard installation type you configure Odoo with the available odoo_config_* options.

Standard installation but with PostgreSQL installed on a remote host (and available from your Ansible inventory):

- name: Odoo
  hosts: odoo_server
  become: yes
  roles:
    - role: odoo
      odoo_version: 11.0
      odoo_config_admin_passwd: SuPerPassWorD
      odoo_config_db_host: pg_server
      odoo_config_db_user: odoo
      odoo_config_db_passwd: PaSsWoRd

Standard installation from a personnal Git repository such as your repository looks like this:

REPO/
├── server              # could be a sub-repository of https://github.com/odoo/odoo
├── addons_oca_web      # another sub-repository (https://github.com/OCA/web here)
├── addons_oca_connector    # yet another sub-repository (https://github.com/OCA/connector)
└── addons              # custom modules

Here we set some options required by the connector framework:

- name: Odoo
  hosts: odoo_server
  become: yes
  roles:
    - role: odoo
      odoo_version: 11.0
      odoo_repo_type: git
      odoo_repo_url: https://SERVER/REPO
      odoo_repo_rev: master
      odoo_repo_dest: "/home/{{ odoo_user }}/odoo"
      odoo_init_env:
        ODOO_CONNECTOR_CHANNELS: root:2
      odoo_config_admin_passwd: SuPerPassWorD
      odoo_config_addons_path:
        - "/home/{{ odoo_user }}/odoo/server/openerp/addons"
        - "/home/{{ odoo_user }}/odoo/server/addons"
        - "/home/{{ odoo_user }}/odoo/addons_oca_web"
        - "/home/{{ odoo_user }}/odoo/addons_oca_connector"
        - "/home/{{ odoo_user }}/odoo/addons"
      odoo_config_server_wide_modules: web,web_kanban,connector
      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:

- 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 by Buildout:

- name: Odoo
  hosts: odoo_server
  become: yes
  roles:
    - role: odoo
      odoo_install_type: buildout
      odoo_version: 11.0
      odoo_repo_type: git
      odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git
      odoo_repo_rev: "{{ odoo_version }}"
      odoo_repo_dest: "/home/{{ odoo_user }}/odoo"

The same but with PostgreSQL installed on a remote host (and available from your Ansible inventory):

- name: Odoo
  hosts: odoo_server
  become: yes
  roles:
    - role: odoo
      odoo_install_type: buildout
      odoo_version: 11.0
      odoo_repo_type: git
      odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git
      odoo_repo_rev: "{{ odoo_version }}"
      odoo_repo_dest: "/home/{{ odoo_user }}/odoo"
      odoo_config_db_host: pg_server
      odoo_config_db_user: odoo
      odoo_config_db_passwd: PaSsWoRd

By default Ansible is looking for a bootstrap.py script and a buildout.cfg file at the root of the cloned repository to call Buildout, but you can change that to point to your own files. Assuming your repository looks like this:

REPO/
├── addons              # custom modules
├── bin
│   └── bootstrap.py
├── builtout.cfg
├── builtout.dev.cfg
├── builtout.prod.cfg
└── builtout.test.cfg

We just set the relevant options to tell Ansible the files to use with the odoo_buildout_* options:

- name: Odoo
  hosts: odoo_server
  become: yes
  roles:
    - role: odoo
      odoo_install_type: buildout
      odoo_version: 11.0
      odoo_repo_type: git
      odoo_repo_url: https://SERVER/REPO
      odoo_repo_rev: master
      odoo_repo_dest: "/home/{{ odoo_user }}/odoo"
      odoo_buildout_bootstrap_path: "/home/{{ odoo_user }}/odoo/bin/bootstrap.py"
      odoo_buildout_config_path: "/home/{{ odoo_user }}/odoo/buildout.prod.cfg"

Variables

See the defaults/main.yml file.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.

Credits

Contributors

  • Sébastien Alix
  • Jordi Ballester Alomar

Do not contact contributors directly about support or help with technical issues.

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.

Licence

This project is licensed under the terms of the GPLv3 license.

More Repositories

1

web

Odoo web client UI related addons
JavaScript
787
star
2

OpenUpgrade

Open source upgrade path for Odoo/OpenERP
Python
689
star
3

server-tools

Tools for Odoo Administrators to improve some technical features on Odoo.
Python
584
star
4

connector

Odoo generic connector framework (jobs queue, asynchronous tasks, channels)
Python
310
star
5

rest-framework

HTML
283
star
6

stock-logistics-warehouse

Odoo Warehouse Management Addons
HTML
280
star
7

reporting-engine

Odoo Alternative Reporting Engine
HTML
270
star
8

account-financial-tools

Odoo Accountant Financial Tools and Utils
Python
256
star
9

maintainer-tools

Odoo Maintainers Tools & conventions for OCA members which evaluate and maintain repositories.
Python
255
star
10

pos

HTML
254
star
11

sale-workflow

Odoo Sales, Workflow and Organization
HTML
252
star
12

vertical-medical

Open Source Healthcare System for Odoo
250
star
13

website

Odoo website builder addons
HTML
237
star
14

project

Odoo Project Management and Services Company Addons
HTML
233
star
15

odoorpc

Python module to pilot your Odoo servers through JSON-RPC.
Python
218
star
16

account-invoicing

Odoo Invoicing Extension Addons
HTML
211
star
17

stock-logistics-workflow

Odoo Stock, Workflow and Organization
HTML
200
star
18

account-financial-reporting

Financial reports for Odoo
Python
197
star
19

l10n-spain

Odoo Spain Localization
Python
195
star
20

hr

Odoo Human Resources Addons
HTML
190
star
21

l10n-brazil

Localização brasileira oficial do Odoo.
Python
190
star
22

partner-contact

Odoo Partner and Contact related addons
HTML
176
star
23

bank-payment

Odoo Electronic Payment
Python
166
star
24

purchase-workflow

Odoo Purchases, Workflow and Organization
HTML
165
star
25

management-system

Odoo for Management Systems (ISO, IEC, BS)
HTML
165
star
26

queue

Asynchronous Job Queue
Python
164
star
27

product-attribute

Odoo Product Attribute
HTML
159
star
28

geospatial

Odoo and GIS
JavaScript
156
star
29

manufacture

Odoo Manufacturing Addons
HTML
148
star
30

contract

Python
145
star
31

bank-statement-import

Bank Import Addons
Python
145
star
32

server-ux

HTML
142
star
33

e-commerce

Odoo E-Commerce server automation addons
HTML
141
star
34

social

Addons concerning odoo's social ERP features and messaging in general
Python
141
star
35

wms

Warehouse Management System for advance logistic with Odoo
Python
141
star
36

connector-telephony

Odoo modules for telephony integration
HTML
141
star
37

stock-logistics-barcode

HTML
139
star
38

mis-builder

Management Information System reports for Odoo: easily build super fast, beautiful, custom reports such as P&L, Balance Sheets and more.
Python
135
star
39

knowledge

Odoo Document & Knowledge Management
HTML
133
star
40

pylint-odoo

Odoo plugin for Pylint
Python
133
star
41

server-auth

JavaScript
131
star
42

field-service

Field Service Management
Python
129
star
43

crm

Odoo CRM, Mail & Newsletter advanced features
HTML
122
star
44

vertical-hotel

Odoo for Hotel Management
Python
121
star
45

helpdesk

Odoo modules for managing a HelpDesk system
Python
120
star
46

odoo-module-migrator

Python library to migrate odoo base code from a version to another
Python
118
star
47

edi

Python
116
star
48

l10n-italy

Odoo Italian localization
Python
110
star
49

timesheet

Odoo Timesheet Management Addons
Python
105
star
50

connector-magento

Connect Odoo with Magento
103
star
51

account-reconcile

Odoo account reconciliation modules (statements, data completion...)
JavaScript
102
star
52

report-print-send

Odoo Printing Services and Printer related addons
Python
102
star
53

dms

Odoo modules for a Document Management System
JavaScript
101
star
54

commission

Odoo Commission Management
Python
95
star
55

delivery-carrier

Odoo Carriers And Deliveries Management
HTML
94
star
56

server-backend

HTML
93
star
57

maintainer-quality-tools

QA tools for Odoo maintainers
Python
92
star
58

multi-company

HTML
87
star
59

connector-prestashop

Connect Odoo with Prestashop
Python
85
star
60

account-analytic

Odoo Account Analytic Related Addons
HTML
84
star
61

openupgradelib

A library with support functions to be called from Odoo migration scripts.
Python
82
star
62

odoo-community.org

The Odoo Community Association Website
CSS
81
star
63

account-payment

Project supervised by the Banking PSC
Python
76
star
64

rma

Odoo for Return Merchandise Authorization (RMA)
Python
74
star
65

credit-control

Odoo modules for the customer credit control
Python
69
star
66

payroll

Odoo modules for payroll management
Python
68
star
67

maintenance

Odoo modules for businesses that implies maintenance tasks
HTML
67
star
68

operating-unit

Manage Operating Units in Odoo
HTML
67
star
69

margin-analysis

Odoo Financial Controlling (margin, costs, ...)
HTML
64
star
70

ddmrp

Python
63
star
71

account-invoice-reporting

Odoo Invoicing reports
HTML
61
star
72

storage

Python
61
star
73

business-requirement

Business Requirements Management via Odoo
Python
61
star
74

connector-interfaces

Odoo Generic Connector for ODBC, .CSV,...
Python
60
star
75

currency

Odoo Currency related Addons (crypto currencies, rate conversion, integrations with third party applications,...)
HTML
59
star
76

iot

Internet of Things (IoT)
Python
59
star
77

pms

Property Management System on Odoo
Python
57
star
78

event

Event Management addons
HTML
56
star
79

account-closing

Odoo Accountant closing tools
Python
55
star
80

product-variant

Python
52
star
81

stock-logistics-transport

Transport management in Odoo
Python
52
star
82

connector-woocommerce

52
star
83

server-env

Tools to manage environment-dependent configuration
HTML
52
star
84

server-brand

HTML
51
star
85

stock-logistics-reporting

Provides Odoo Logistics reporting modules
HTML
51
star
86

l10n-switzerland

Odoo Swiss localization
Python
51
star
87

l10n-thailand

Thai localization
HTML
49
star
88

oca-addons-repo-template

OCA Repository Template
Jinja
47
star
89

connector-ecommerce

Generic module used on Odoo for E-Commerce industry
Python
47
star
90

account-fiscal-rule

Odoo Taxes & Fiscal Rules Management
Python
47
star
91

search-engine

Python
45
star
92

hr-expense

Human Resources Expenses OCA modules for Odoo
HTML
44
star
93

hr-attendance

HR Attendance OCA modules for Odoo
HTML
43
star
94

interface-github

Tools to interact with github from Odoo
Python
43
star
95

product-pack

Odoo modules related to product packs
Python
40
star
96

stock-logistics-tracking

This repository contains modules around stock packages management
HTML
39
star
97

oca-github-bot

The GitHub Bot of the Odoo Community Association (OCA)
Python
38
star
98

sale-reporting

HTML
37
star
99

brand

Manage brands for products and companies
HTML
37
star
100

vertical-association

Odoo addons for membership related tasks
HTML
37
star