From 669e79ad41b59ec3901642cf0533e71ae412d589 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 19 Sep 2017 17:04:55 +0100 Subject: [PATCH] xci: Move the destroy-env.sh script to xci-deploy.sh There is no particular need to execute the bash script using Ansible. Lets move it to the xci-deploy.sh script instead. Change-Id: I0fa91195d9c3647bb4766d76c28892e2f13e1e98 Signed-off-by: Markos Chandras --- xci/playbooks/provision-vm-nodes.yml | 16 ---------------- xci/xci-deploy.sh | 2 ++ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/xci/playbooks/provision-vm-nodes.yml b/xci/playbooks/provision-vm-nodes.yml index fd8c31d2..b9c13999 100644 --- a/xci/playbooks/provision-vm-nodes.yml +++ b/xci/playbooks/provision-vm-nodes.yml @@ -63,19 +63,3 @@ copy: src: "{{ OPNFV_RELENG_PATH }}/bifrost/" dest: "{{ OPENSTACK_BIFROST_PATH }}" - -- hosts: localhost - connection: local - become: true - gather_facts: true - vars_files: - - ../var/opnfv.yml - tasks: - - name: Load distribution variables - include_vars: - file: ../var/{{ ansible_os_family }}.yml - - - name: destroy VM nodes created by previous deployment - command: "/bin/bash ./scripts/destroy-env.sh" - args: - chdir: "{{ OPENSTACK_BIFROST_PATH }}" diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 19f2c18a..78194fbe 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -114,6 +114,8 @@ fi #------------------------------------------------------------------------------- echo "Info: Starting provisining VM nodes using openstack/bifrost" echo "-------------------------------------------------------------------------" +cd $XCI_PATH/../bifrost/ +sudo -E bash ./scripts/destroy-env.sh cd $XCI_PATH/playbooks # NOTE(hwoarang) we need newer ansible to work on the following playbook sudo pip uninstall -y ansible || true -- 2.16.6