Download OpenStack git repo from local server for CI 27/61027/1
authorHarry Huang <huangxiangyu5@huawei.com>
Fri, 17 Aug 2018 07:00:42 +0000 (15:00 +0800)
committerHarry Huang <huangxiangyu5@huawei.com>
Fri, 17 Aug 2018 07:00:42 +0000 (15:00 +0800)
JIRA: COMPASS-614

Online git clone is heavily affected by the network
condition of huawei lab. Download OpenStack git repo
from local server to regain stability

Change-Id: I92886b9c65068294f303d27de1b3b0261442af34
Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
deploy/adapters/ansible/roles/config-osa/tasks/main.yml

index ff7172b..be7fbbc 100755 (executable)
         tasks:
           - name: refresh
             setup:
+
+- name: create openstack git directory
+  file:
+    path: /opt/git/openstack
+    state: directory
+  when:
+    - checkresult.rc == 0
+    - offline_deployment is defined and offline_deployment == "Disable"
+
+- name: download openstack git package
+  get_url:
+    url: "http://192.168.137.222/download/openstack-queens-git.tar.gz"
+    dest: "/opt/git/openstack"
+  when:
+    - checkresult.rc == 0
+    - offline_deployment is defined and offline_deployment == "Disable"
+
+- name: extract openstack git repo
+  shell:
+    tar zxf openstack-queens-git.tar.gz
+  args:
+    chdir: "/opt/git/openstack"
+  when:
+    - checkresult.rc == 0
+    - offline_deployment is defined and offline_deployment == "Disable"