diff options
author | QiLiang <liangqi1@huawei.com> | 2016-09-13 20:42:02 +0800 |
---|---|---|
committer | qi liang <liangqi1@huawei.com> | 2016-09-14 03:11:22 +0000 |
commit | 77ed8a151a33caf50c1bb2ac7edf60b55fab9e06 (patch) | |
tree | e163db931e9d7d66c12f36376df604aaa3574010 /deploy/adapters/ansible/roles/setup-network/tasks/main.yml | |
parent | a2fc2124740877d26061ecd9b1d3f573771e683c (diff) |
Add network connectivity check
JIRA: COMPASS-485
Change-Id: I3ca177118dec362ca2350c746519b83889ec3f83
Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/setup-network/tasks/main.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/setup-network/tasks/main.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml index 7873c073..e1fdf925 100644 --- a/deploy/adapters/ansible/roles/setup-network/tasks/main.yml +++ b/deploy/adapters/ansible/roles/setup-network/tasks/main.yml @@ -38,6 +38,9 @@ with_items: - setup_networks/log.py - setup_networks/setup_networks.py + - setup_networks/check_network.py + tags: + - network_check - name: copy boot scripts copy: src={{ item }} dest=/etc/init.d/ mode=0755 @@ -58,7 +61,18 @@ tags: - recovery +- name: check basic network connectivity + shell: > + python /opt/setup_networks/check_network.py \ + "{{ inventory_hostname }}" \ + "{{ ip_settings }}" + tags: + - network_check + retries: 3 + delay: 2 + - name: add to boot scripts service: name=net_init enabled=yes - meta: flush_handlers + |