Add condition check for modification of lxc image download 75/60475/1
authorHarry Huang <huangxiangyu5@huawei.com>
Wed, 1 Aug 2018 08:23:38 +0000 (16:23 +0800)
committerHarry Huang <huangxiangyu5@huawei.com>
Wed, 1 Aug 2018 08:23:38 +0000 (16:23 +0800)
JIRA: COMPASS-607

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

index 914b945..ff7172b 100755 (executable)
   copy:
     src: lxc_cache_prestage.patch
     dest: /etc/ansible/roles/lxc_hosts/tasks/lxc_cache_prestage.patch
+  when:
+    - checkresult.rc == 0
+    - offline_deployment is defined and offline_deployment == "Disable"
 
 - name: patch lxc_cache_prestage.yml
   shell:
     patch -p0 < lxc_cache_prestage.patch
   args:
     chdir: /etc/ansible/roles/lxc_hosts/tasks/
+  when:
+    - checkresult.rc == 0
+    - offline_deployment is defined and offline_deployment == "Disable"
 
 - name: add cache refresh
   blockinfile: