From f70a253585aee5af7f0a2b5990c8fa03c75ec520 Mon Sep 17 00:00:00 2001 From: raneq <46573858+raneq@users.noreply.github.com> Date: Mon, 20 May 2019 12:09:24 +0200 Subject: [PATCH] Redirect odoobin output (#52) Right now, if the command fails, Ansible gets nothing in output terms (neither err), and this is bad to debug. We need to go find the log inside the host at /etc/odoo/odoo.log, but this is mixed with other log entries. A perfect approach would feed both stdout and default log. Note: this was already fixed in tasks/main.yml --- tasks/community-modules.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/community-modules.yml b/tasks/community-modules.yml index fca7541..5d21c0f 100644 --- a/tasks/community-modules.yml +++ b/tasks/community-modules.yml @@ -14,10 +14,10 @@ - name: Update Odoo modules list 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 }} --update all --stop-after-init --without-demo=all" + 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 }} --update all --stop-after-init --without-demo=all --logfile=/dev/stdout --log-level=warn" - name: Install community Odoo roles 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_community_odoo_modules }} --stop-after-init --without-demo=all" + 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_community_odoo_modules }} --stop-after-init --without-demo=all --logfile=/dev/stdout --log-level=warn" notify: restart odoo