File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 119119 state : link
120120 when : odoo_role_odoo_version < "12.0" and ansible_distribution == "Ubuntu" and not ansible_distribution_version >= "18.04"
121121
122+ - name : Check if Odoo is already installed in virtualenv
123+ become : true
124+ become_user : " {{ odoo_role_odoo_user }}"
125+ ansible.builtin.shell : >
126+ {{ odoo_role_odoo_python_path }} -m pip list | grep odoo
127+ register : odoo_package_is_installed
128+ failed_when : odoo_package_is_installed.rc not in [0,1]
129+
122130- name : Install Odoo
123131 become : true
124132 become_user : " {{ odoo_role_odoo_user }}"
125133 shell : " cd {{ odoo_role_odoo_path }} && {{ odoo_role_odoo_python_path }} setup.py install"
126- when : odoo_role_desired_tar_download.changed or odoo_role_desired_git_download.changed
134+ when : odoo_role_desired_tar_download.changed or odoo_role_desired_git_download.changed or odoo_package_is_installed.stdout == ''
127135
128136- name : Populate community db modules
129137 set_fact :
You can’t perform that action at this time.
0 commit comments