Debian Codegraph @

ansible_collections/cloudscale_ch/cloud/tests/integration/targets/common/tasks/cleanup_volumes.yml

raw
1 ---
2 - name: List all volumes
3 uri:
4 url: 'https://api.cloudscale.ch/v1/volumes'
5 headers:
6 Authorization: 'Bearer {{ cloudscale_api_token }}'
7 status_code: 200
8 register: volume_list
9
10 - name: Remove all volumes created by this test run
11 cloudscale_ch.cloud.volume:
12 uuid: '{{ item.uuid }}'
13 state: 'absent'
14 when: cloudscale_resource_prefix in item.name
15 with_items: '{{ volume_list.json }}'
16 loop_control:
17 label: '{{ item.name }} ({{ item.uuid }})'