From 535aeeb3e3ccffecd0591ef388dbbfea4b51e4c3 Mon Sep 17 00:00:00 2001 From: Stepan Andrushko Date: Mon, 16 Apr 2018 14:17:54 +0300 Subject: OpenStack deployment: delete RS or all VMs New parameter is added to shell script to delete data for VMs either from input file or all. Added disk images removal as per new input parameter. JIRA: YARDSTICK-1123 Change-Id: I8d2cee4a3a7ad7147f4d59303bab656d80370221 Signed-off-by: Stepan Andrushko --- .../infra_destroy_previous_configuration/tasks/delete_vm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml') diff --git a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml index 5e43ee81e..91e949344 100644 --- a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml +++ b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml @@ -16,14 +16,14 @@ - name: Destroy old VMs virt: command: destroy - name: "{{ node_item.hostname }}" - when: node_item.hostname in virt_vms.list_vms + name: "{{ vmhost_item }}" + when: clean_up | bool or vmhost_item in deploy_vms ignore_errors: yes # Ignore errors as VM can be running while undefined - name: Undefine old VMs virt: command: undefine - name: "{{ node_item.hostname }}" - when: node_item.hostname in virt_vms.list_vms + name: "{{ vmhost_item }}" + when: clean_up | bool or vmhost_item in deploy_vms ignore_errors: yes -- cgit 1.2.3-korg