[compass] bugfix: it is noneffective to retry the network checking 25/27125/2
authormeimei <meimei@huawei.com>
Wed, 18 Jan 2017 01:34:22 +0000 (09:34 +0800)
committermeimei <meimei@huawei.com>
Wed, 18 Jan 2017 09:23:58 +0000 (17:23 +0800)
Change-Id: I97413575e1cac87da4ac99bc45e1c55777f38243
Signed-off-by: meimei <meimei@huawei.com>
deploy/adapters/ansible/roles/setup-network/tasks/main.yml

index 9edee35..24d69f6 100644 (file)
     python /opt/setup_networks/check_network.py \
            "{{ inventory_hostname }}" \
            "{{ ip_settings | to_json }}"
-  tags:
-    - network_check
+  register: result
+  until: result.stderr.find('unreachable')==-1
   retries: 3
   delay: 2
+  tags:
+    - network_check
 
 - name: add to boot scripts
   shell: update-rc.d net_init defaults