ansible-odoo
ansible-odoo copied to clipboard
OCA repositories
It would be nice to be able to set a list of OCA projects we want to deploy, and have them automatically cloned from github.
Great idea. Internally we use subrepositories/submodules to manage this, so when we clone a customer repo, all subrepo are pulled too.
Aren't submodules a pain when you merge updates in?
Come to think of it, it would be useful to be able to add custom git repositories too. For example we use 2 private repositories for proprietary modules (under OPW clauses) and custom scripts.
In our configuration of Ansible, we just set the options odoo_repo_url and odoo_repo_dest on our customer repositories, and it's the customer repo which defines the version to use for subrepos (like private addons and custom scripts like you). Never had a problem with merge from now, but it could occur yep.
But your idea is good, and if I have time to add it, it would not have been for OCA specifically but for all kind of repositories (git and hg). Do not hesitate to make a PR if you want.
OK I see how you manage it, maybe it's the right way. I'll if I need to implement it for us and maybe make a PR indeed.
Hey, I'm trying to use a playbook with a pre_task as follows:
- name: Clone project management addons repo
sudo: yes
sudo_user: "{{ odoo_user }}"
git: repo=https://github.com/OCA/project.git
dest={{ odoo_repo_dest }}/project_addons/
version=9.0
update={{ odoo_repo_update and 'yes' or 'no' }}
when: odoo_repo_type == 'git' and odoo_repo_url
notify: Restart Odoo
tags:
- odoo_project
And then adding "/home/{{ odoo_user }}/odoo/server/project_addons" to the odoo_config_addons_path. I don't know if this is helpful here, but in any case I'm not sure if it sits OK with the confusing (to me) Legal LGPL /AGPL setup, since the repo I cloned is AGPL. Can either of you advise?
See PR #105 which provides options to register and deploy (custom) addons and also enterprise Git repo's.