diff options
author | 2016-09-13 20:42:02 +0800 | |
---|---|---|
committer | 2016-09-14 10:06:12 +0800 | |
commit | 239a72670e7ea9fcfdfa97c0b508581e474ce790 (patch) | |
tree | 9250db21177378f4b5b24923d3928e6ef67830a2 /deploy/adapters/ansible/roles/setup-network/tasks/main.yml | |
parent | 0fef086d1d4c3489be2c25ff01d532b02f3b72ee (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 + |