
In case of tripleo setups, Tobiko can be executed from the undercloud or from a different node (test_host). In case it is not run from the undercloud, the tobiko-cleanup role has to be delegated to the undercloud node. Change-Id: Ic81196dee9735acbd1841baeb25003f96f69d5a2
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
---
|
|
- name: "cleanup Loadbalancers created by Tobiko tests"
|
|
shell: |
|
|
{{ openstack_cmd }} loadbalancer list -f value -c 'name' | \
|
|
grep "^tobiko\." | \
|
|
xargs -r {{ openstack_cmd }} loadbalancer delete --cascade --wait
|
|
ignore_errors: yes
|
|
|
|
- name: "cleanup Heat stacks created by Tobiko tests"
|
|
shell: |
|
|
{{ openstack_cmd }} stack list -f value -c 'Stack Name' | \
|
|
grep "^tobiko\." | \
|
|
xargs -r timeout 180 {{ openstack_cmd }} stack delete -y --wait
|
|
register: result
|
|
retries: 5
|
|
delay: 5
|
|
until: result.rc == 0
|
|
ignore_errors: yes
|
|
|
|
- name: "cleanup subnet pools created by Tobiko tests"
|
|
shell: |
|
|
{{ openstack_cmd }} subnet pool list -f value -c 'Name' | \
|
|
grep "^tobiko\." | \
|
|
xargs -r {{ openstack_cmd }} subnet pool delete
|
|
ignore_errors: yes
|
|
|
|
- name: "cleanup Security Groups created by Tobiko tests"
|
|
shell: |
|
|
{{ openstack_cmd }} security group list -f value -c 'Name' | \
|
|
grep "^tobiko\." | \
|
|
xargs -r {{ openstack_cmd }} security group delete
|
|
ignore_errors: yes
|
|
|
|
- name: "cleanup Glance images created by Tobiko tests"
|
|
shell: |
|
|
{{ openstack_cmd }} image list -f value -c 'Name' | \
|
|
grep "^tobiko\." | \
|
|
xargs -r {{ openstack_cmd }} image delete
|
|
ignore_errors: yes
|