diff options
author | Stepan Andrushko <stepanx.andrushko@intel.com> | 2018-04-16 14:17:54 +0300 |
---|---|---|
committer | Stepan Andrushko <stepanx.andrushko@intel.com> | 2018-04-17 19:50:11 +0300 |
commit | 535aeeb3e3ccffecd0591ef388dbbfea4b51e4c3 (patch) | |
tree | 9e2535f37300c8e056b1e7b98b27c4f9cbaca468 /ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml | |
parent | f3f75ea39678b6da24e5ed6a61f77586f71d0128 (diff) |
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 <stepanx.andrushko@intel.com>
Diffstat (limited to 'ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml')
-rw-r--r-- | ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml | 8 |
1 files changed, 4 insertions, 4 deletions
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 |