{"id":13725821,"url":"https://github.com/OCA/ansible-odoo","last_synced_at":"2025-05-07T21:30:30.003Z","repository":{"id":22970708,"uuid":"26320682","full_name":"OCA/ansible-odoo","owner":"OCA","description":"Ansible role for Odoo","archived":false,"fork":false,"pushed_at":"2020-01-21T22:17:14.000Z","size":177,"stargazers_count":106,"open_issues_count":22,"forks_count":114,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-14T16:44:44.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OCA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-07T13:25:06.000Z","updated_at":"2024-08-19T14:48:49.000Z","dependencies_parsed_at":"2022-08-21T18:30:17.407Z","dependency_job_id":null,"html_url":"https://github.com/OCA/ansible-odoo","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fansible-odoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fansible-odoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fansible-odoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OCA%2Fansible-odoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OCA","download_url":"https://codeload.github.com/OCA/ansible-odoo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252957006,"owners_count":21831420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:02:36.418Z","updated_at":"2025-05-07T21:30:29.705Z","avatar_url":"https://github.com/OCA.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Odoo [![Build Status](https://travis-ci.org/OCA/ansible-odoo.png)](https://travis-ci.org/OCA/ansible-odoo)\n\nAnsible role to install Odoo from a Git or Mercurial repository, or from pip,\nand configure it.\n\nThis role supports three types of installation:\n\n* **standard**: install the Odoo dependencies from APT repositories and the\nOdoo project from a Git/Hg repository. Odoo is configured with Ansible options\n(`odoo_config_*` ones).\n\n* **pip**: install Odoo and its dependencies (modules and Python packages)\nfrom a pip requirements.txt file. Odoo is configured with  Ansible options\n(`odoo_config_*` ones).\n\n* **buildout**: build the Odoo project from a Git/Hg repository containing a\nBuildout configuration file based on the\n[anybox.recipe.odoo](https://pypi.python.org/pypi/anybox.recipe.odoo/) recipe.\nOdoo and its dependencies are then installed and executed inside a Python\nvirtual environment. The configuration part is also managed by Buildout\n(`odoo_config_*` options are not used excepting the `odoo_config_db_*` ones\nfor PostgreSQL related tasks).\n\nMinimum Ansible Version: 2.4\n\n## Supported versions and systems\n\n| System / Odoo | 8.0 | 9.0 | 10.0 | 11.0 |\n|---------------|-----|-----|------|------|\n| Debian 8      | yes | yes | yes  |  -   |\n| Debian 9      | yes | yes | yes  | yes  |\n| Ubuntu 14.04  | yes | yes | yes  |  -   |\n| Ubuntu 16.04  | yes | yes | yes  | yes  |\n\n## Example (Playbook)\n\n### odoo_install_type: standard (default)\n\nStandard installation (assuming that PostgreSQL is installed and running on\nthe same host):\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_version: 11.0\n      odoo_config_admin_passwd: SuPerPassWorD\n```\n\nWith the standard installation type you configure Odoo with the available\n`odoo_config_*` options.\n\nStandard installation but with PostgreSQL installed on a remote host (and\navailable from your Ansible inventory):\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_version: 11.0\n      odoo_config_admin_passwd: SuPerPassWorD\n      odoo_config_db_host: pg_server\n      odoo_config_db_user: odoo\n      odoo_config_db_passwd: PaSsWoRd\n```\n\nStandard installation from a personnal Git repository such as your repository\nlooks like this:\n\n```sh\nREPO/\n├── server              # could be a sub-repository of https://github.com/odoo/odoo\n├── addons_oca_web      # another sub-repository (https://github.com/OCA/web here)\n├── addons_oca_connector    # yet another sub-repository (https://github.com/OCA/connector)\n└── addons              # custom modules\n```\n\nHere we set some options required by the ``connector`` framework:\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_version: 11.0\n      odoo_repo_type: git\n      odoo_repo_url: https://SERVER/REPO\n      odoo_repo_rev: master\n      odoo_repo_dest: \"/home/{{ odoo_user }}/odoo\"\n      odoo_init_env:\n        ODOO_CONNECTOR_CHANNELS: root:2\n      odoo_config_admin_passwd: SuPerPassWorD\n      odoo_config_addons_path:\n        - \"/home/{{ odoo_user }}/odoo/server/openerp/addons\"\n        - \"/home/{{ odoo_user }}/odoo/server/addons\"\n        - \"/home/{{ odoo_user }}/odoo/addons_oca_web\"\n        - \"/home/{{ odoo_user }}/odoo/addons_oca_connector\"\n        - \"/home/{{ odoo_user }}/odoo/addons\"\n      odoo_config_server_wide_modules: web,web_kanban,connector\n      odoo_config_workers: 8\n```\n\n### odoo_install_type: pip\n\nPip installation (assuming that PostgreSQL is installed and running on\nthe same host). We need to ensure that the environment variable LC_ALL is used\nif Odoo version 11 is to be used:\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_install_type: pip\n      odoo_version: 11.0\n      odoo_pip_requirements_url: https://raw.githubusercontent.com/OCA/sample-oca-pip-requirements/11.0/requirements.txt\n      odoo_config_admin_passwd: SuPerPassWorD\n  environment:\n    LC_ALL: en_US.UTF-8\n\n```\n\n\n### odoo_install_type: buildout\n\nWith a Buildout installation type, Odoo is installed and configured directly\nby Buildout:\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_install_type: buildout\n      odoo_version: 11.0\n      odoo_repo_type: git\n      odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git\n      odoo_repo_rev: \"{{ odoo_version }}\"\n      odoo_repo_dest: \"/home/{{ odoo_user }}/odoo\"\n```\n\nThe same but with PostgreSQL installed on a remote host (and available from\nyour Ansible inventory):\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_install_type: buildout\n      odoo_version: 11.0\n      odoo_repo_type: git\n      odoo_repo_url: https://github.com/osiell/odoo-buildout-example.git\n      odoo_repo_rev: \"{{ odoo_version }}\"\n      odoo_repo_dest: \"/home/{{ odoo_user }}/odoo\"\n      odoo_config_db_host: pg_server\n      odoo_config_db_user: odoo\n      odoo_config_db_passwd: PaSsWoRd\n```\n\nBy default Ansible is looking for a `bootstrap.py` script and a `buildout.cfg`\nfile at the root of the cloned repository to call Buildout, but you can change\nthat to point to your own files. Assuming your repository looks like this:\n\n```sh\nREPO/\n├── addons              # custom modules\n├── bin\n│   └── bootstrap.py\n├── builtout.cfg\n├── builtout.dev.cfg\n├── builtout.prod.cfg\n└── builtout.test.cfg\n```\n\nWe just set the relevant options to tell Ansible the files to use with the\n`odoo_buildout_*` options:\n\n```yaml\n- name: Odoo\n  hosts: odoo_server\n  become: yes\n  roles:\n    - role: odoo\n      odoo_install_type: buildout\n      odoo_version: 11.0\n      odoo_repo_type: git\n      odoo_repo_url: https://SERVER/REPO\n      odoo_repo_rev: master\n      odoo_repo_dest: \"/home/{{ odoo_user }}/odoo\"\n      odoo_buildout_bootstrap_path: \"/home/{{ odoo_user }}/odoo/bin/bootstrap.py\"\n      odoo_buildout_config_path: \"/home/{{ odoo_user }}/odoo/buildout.prod.cfg\"\n```\n\n## Variables\n\nSee the [defaults/main.yml](defaults/main.yml) file.\n\n## Bug Tracker\n\nBugs are tracked on [GitHub Issues](\nhttps://github.com/OCA/ansible-odoo/issues).  In case of trouble, please\ncheck there if your issue has already been reported. If you spotted it first,\nhelp us smash it by providing detailed and welcomed feedback.\n\n## Credits\n\n### Contributors\n\n* Sébastien Alix\n* Jordi Ballester Alomar\n\nDo not contact contributors directly about support or help with technical issues.\n\n\n### Maintainer\n\n[![Odoo Community Association](\nhttps://odoo-community.org/logo.png)](https://odoo-community.org)\n\nThis module is maintained by the OCA.\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\nTo contribute to this module, please visit https://odoo-community.org.\n\n## Licence\n\nThis project is licensed under the terms of the GPLv3 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOCA%2Fansible-odoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOCA%2Fansible-odoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOCA%2Fansible-odoo/lists"}