mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 06:11:26 -07:00
Fix failure of cloudscale_floating_ip without server (#53702)
The cloudscale_floating_ip module failed if no server was assigned to the floating IP. This also adds a test to avoid a regression. The only way to have a floating IP without a server assigned is to delete the server where the floating IP is currently assigned. Under normal circumstances it's not possible to have an unassigned floating IP.
This commit is contained in:
parent
980ca564ce
commit
a65a137cdd
3 changed files with 29 additions and 1 deletions
|
@ -176,7 +176,8 @@ class AnsibleCloudscaleFloatingIP(AnsibleCloudscaleBase):
|
|||
|
||||
# Replace the server with just the UUID, the href to the server is useless and just makes
|
||||
# things more complicated
|
||||
resp['server'] = resp['server']['uuid']
|
||||
if resp['server'] is not None:
|
||||
resp['server'] = resp['server']['uuid']
|
||||
|
||||
return resp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue