From 5dca9f698a0a9af4b24e6268a6bc8c7b5d9379bf Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Tue, 29 Sep 2020 21:12:10 +0100 Subject: [PATCH] fix(ansible): try to workaround ansible unarchive bug --- ansible/roles/common/scenarios/release.yml | 51 ++++++++++++++++++---- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/ansible/roles/common/scenarios/release.yml b/ansible/roles/common/scenarios/release.yml index 1a6887dff..005a85039 100644 --- a/ansible/roles/common/scenarios/release.yml +++ b/ansible/roles/common/scenarios/release.yml @@ -19,11 +19,22 @@ path: "{{ hotpot_work_dir }}/bin/osdsapiserver" register: apireleasesexisted -- name: download and extract the api release tarball if not exists +- name: download the api release tarball if not exists + get_url: + url: "{{ api_download_url }}" + dest: /tmp/api_ArChIvE.tar.gz + remote_src: yes + register: dlresult + until: dlresult is not failed + retries: 5 + delay: 10 + when: + - apireleasesexisted.stat.exists is undefined or apireleasesexisted.stat.exists == false + +- name: extract the api release tarball if downloaded unarchive: - src: "{{ api_download_url }}" + src: /tmp/api_ArChIvE.tar.gz dest: /tmp/ - remote_src: yes when: - apireleasesexisted.stat.exists is undefined or apireleasesexisted.stat.exists == false @@ -49,11 +60,22 @@ path: "{{ hotpot_work_dir }}/bin/osdslet" register: controllerreleasesexisted -- name: download and extract the controller release tarball if not exists +- name: download the controller release tarball if not exists + get_url: + url: "{{ controller_download_url }}" + dest: /tmp/controller_ArChIvE.tar.gz + remote_src: yes + register: dlresult + until: dlresult is not failed + retries: 5 + delay: 10 + when: + - controllerreleasesexisted.stat.exists is undefined or controllerreleasesexisted.stat.exists == false + +- name: extract the controller release tarball if downloaded unarchive: - src: "{{ controller_download_url }}" + src: /tmp/controller_ArChIvE.tar.gz dest: /tmp/ - remote_src: yes when: - controllerreleasesexisted.stat.exists is undefined or controllerreleasesexisted.stat.exists == false @@ -79,11 +101,22 @@ path: "{{ hotpot_work_dir }}/bin/osdsdock" register: dockreleasesexisted -- name: download and extract the dock release tarball if not exists +- name: download the dock release tarball if not exists + get_url: + url: "{{ dock_download_url }}" + dest: /tmp/dock_ArChIvE.tar.gz + remote_src: yes + register: dlresult + until: dlresult is not failed + retries: 5 + delay: 10 + when: + - dockreleasesexisted.stat.exists is undefined or dockreleasesexisted.stat.exists == false + +- name: extract the dock release tarball if downloaded unarchive: - src: "{{ dock_download_url }}" + src: /tmp/dock_ArChIvE.tar.gz dest: /tmp/ - remote_src: yes when: - dockreleasesexisted.stat.exists is undefined or dockreleasesexisted.stat.exists == false