Skip to content

Commit

Permalink
Merge pull request #51 from coopdevs/fix-v0.0.6
Browse files Browse the repository at this point in the history
Fix Odoo not installing when it should

I had this error ansible/ansible#17500
register is executed on skipped tasks
  • Loading branch information
raneq authored May 14, 2019
2 parents 3df8855 + 8552ea5 commit 0c544d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tasks/download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
dest: "{{ odoo_role_odoo_download_path }}"
owner: "{{ odoo_role_odoo_user }}"
group: "{{ odoo_role_odoo_group }}"
register: odoo_role_desired_download
register: odoo_role_desired_tar_download

- name: Clean older release packets
vars:
Expand All @@ -37,7 +37,7 @@
owner: "{{ odoo_role_odoo_user }}"
group: "{{ odoo_role_odoo_group }}"
extra_opts: [--strip-components=1]
when: odoo_role_desired_download.changed
when: odoo_role_desired_tar_download.changed

when: odoo_role_download_strategy == "tar"

Expand All @@ -51,6 +51,6 @@
version: "{{ odoo_role_odoo_git_ref }}"
depth: 1
force: yes
register: odoo_role_desired_download
register: odoo_role_desired_git_download
when: odoo_role_download_strategy == "git"

4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
- name: Install Odoo
become_user: "{{ odoo_role_odoo_user }}"
shell: "cd {{ odoo_role_odoo_path }} && {{ odoo_role_odoo_python_path }} setup.py install"
when: odoo_role_desired_download.changed
when: odoo_role_desired_tar_download.changed or odoo_role_desired_git_download.changed

- name: Add Odoo config
become: yes
Expand All @@ -109,7 +109,7 @@
- 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"
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"
notify: restart odoo

- import_tasks: community-modules.yml
Expand Down

0 comments on commit 0c544d3

Please sign in to comment.