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>
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 }}"
#-------------------------------------------------------------------------------
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