From 18750deda8fa4ebfd5948912438266c32c5ad3ed Mon Sep 17 00:00:00 2001 From: zhihui wu Date: Mon, 12 Mar 2018 17:08:16 +0800 Subject: adjust the execution pipeline for vnf - Add a new execution logic for vnf. use a variable "sut" as the conditional judgement. - Loop attempt to connect the vnf - check whether install python in remote target Change-Id: I29b13603a0f75380471c586c642d46d626d8ce22 Signed-off-by: zhihui wu --- resources/ansible_roles/openstack/tasks/main.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'resources/ansible_roles/openstack/tasks/main.yml') diff --git a/resources/ansible_roles/openstack/tasks/main.yml b/resources/ansible_roles/openstack/tasks/main.yml index b42c43fb..57942260 100644 --- a/resources/ansible_roles/openstack/tasks/main.yml +++ b/resources/ansible_roles/openstack/tasks/main.yml @@ -86,6 +86,14 @@ external_network: "{{ external_network }}" register: stack +- name: Wait 600s for vm connection to become reachable/usable + wait_for: + host: "{{ item.output_value }}" + port: 22 + timeout: 600 + search_regex: OpenSSH + with_items: "{{ stack.stack.outputs }}" + - name: generating inventory file template: src: hosts.j2 @@ -95,9 +103,3 @@ template: src: ssh.cfg.j2 dest: ./ssh.cfg - -- name: Wait 600 seconds for target connection to become reachable/usable - wait_for_connection: - -- name: install python 2 - raw: test -e /usr/bin/python || (apt-get -y update && apt-get install -y python-minimal) -- cgit 1.2.3-korg