Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
enricostano committed May 29, 2019
1 parent f70a253 commit 78c2765
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,22 @@
group: "{{ odoo_role_odoo_group }}"
notify: restart odoo

- name: Build the list of new modules to install
become: yes
become_user: "{{ odoo_role_odoo_user }}"
shell: "psql {{ odoo_role_odoo_db_name }} -tAc \"SELECT name FROM (VALUES ('{{ odoo_role_odoo_core_modules.split(',') | join('\\'),(\\'') }}')) AS t (name) EXCEPT SELECT name FROM ir_module_module WHERE state = 'installed';\""
register: modules_to_install
changed_when: false
tags:
- mods

- name: Init Odoo database
become: yes
become_user: "{{ odoo_role_odoo_user }}"
command: "{{ odoo_role_odoo_python_path }} {{ odoo_role_odoo_bin_path }} -c {{ odoo_role_odoo_config_path }}/odoo.conf -d {{ odoo_role_odoo_db_name }} --init {{ odoo_role_odoo_core_modules }} --stop-after-init --without-demo=all --logfile=/dev/stdout --log-level=warn"
command: "{{ odoo_role_odoo_python_path }} {{ odoo_role_odoo_bin_path }} -c {{ odoo_role_odoo_config_path }}/odoo.conf -d {{ odoo_role_odoo_db_name }} --init {{ modules_to_install }} --stop-after-init --without-demo=all --logfile=/dev/stdout --log-level=warn"
notify: restart odoo
tags:
- mods

- import_tasks: community-modules.yml

Expand Down

0 comments on commit 78c2765

Please sign in to comment.