From d55bff0c7a5ef7b63c34e87f92decfe796e8fd16 Mon Sep 17 00:00:00 2001 From: raneq <46573858+raneq@users.noreply.github.com> Date: Fri, 5 Jul 2019 12:18:44 +0200 Subject: [PATCH] Remove and create again unarchive directory target before unarchiving (#54) --- tasks/download.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tasks/download.yml b/tasks/download.yml index 4b4a135..9fc5e57 100644 --- a/tasks/download.yml +++ b/tasks/download.yml @@ -29,6 +29,17 @@ register: find changed_when: find.stdout != "" + - name: Clean target directory + file: + path: "{{ odoo_role_odoo_path }}" + state: "{{ item }}" + owner: "{{ odoo_role_odoo_user }}" + group: "{{ odoo_role_odoo_group }}" + with_items: + - absent + - directory + when: odoo_role_desired_tar_download.changed + - name: Uncompress downloaded Odoo unarchive: src: "{{ odoo_role_odoo_download_path }}"