xci: Move the destroy-env.sh script to xci-deploy.sh 97/42397/8
authorMarkos Chandras <mchandras@suse.de>
Tue, 19 Sep 2017 16:04:55 +0000 (17:04 +0100)
committerMarkos Chandras <mchandras@suse.de>
Thu, 21 Sep 2017 20:51:43 +0000 (21:51 +0100)
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 <mchandras@suse.de>
xci/playbooks/provision-vm-nodes.yml
xci/xci-deploy.sh

index fd8c31d..b9c1399 100644 (file)
       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 }}"
index 19f2c18..78194fb 100755 (executable)
@@ -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