Debian Codegraph @

ansible_collections/cloudscale_ch/cloud/tests/integration/targets/floating_ip/tasks/unassigned.yml

raw
1 ---
2 - name: Assign Floating IP to server test01
3 cloudscale_ch.cloud.floating_ip:
4 name: '{{ cloudscale_resource_prefix }}-unassigned'
5 ip_version: 6
6 server: '{{ test01.uuid }}'
7 reverse_ptr: '{{ cloudscale_resource_prefix }}-unassigned.example.com'
8 region: '{{ cloudscale_test_region }}'
9 register: floating_ip
10
11 # The only way to have an unassigned floating IP is to delete the server
12 # where the floating IP is currently assigned.
13 - name: Delete server test01
14 cloudscale_ch.cloud.server:
15 uuid: '{{ test01.uuid }}'
16 state: 'absent'
17
18 - name: Do not fail if floating IP is unassigned
19 cloudscale_ch.cloud.floating_ip:
20 ip: '{{ floating_ip.ip }}'
21 register: floating_ip_not_fail
22 - name: Verify do not fail if floating IP is unassigned
23 assert:
24 that:
25 - floating_ip_not_fail is successful
26 - floating_ip_not_fail is not changed
27 - floating_ip_not_fail.server == None