mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Pass wait/timeout parameters to floating IP APIs in os_server
If a server already exists when os_server is run, but a floating IP was not assigned to the server when one was requested, the module will attempt to add an IP to the existing server. But it would not pass the wait/timeout params to the floating IP APIs. If wait was True, you could get back a server dict that did not show the floating IP because it did not wait.
This commit is contained in:
parent
82a1208e64
commit
1bdc3b3bb0
1 changed files with 5 additions and 1 deletions
|
@ -498,6 +498,8 @@ def _check_floating_ips(module, cloud, server):
|
||||||
auto_ip=auto_ip,
|
auto_ip=auto_ip,
|
||||||
ips=floating_ips,
|
ips=floating_ips,
|
||||||
ip_pool=floating_ip_pools,
|
ip_pool=floating_ip_pools,
|
||||||
|
wait=module.params['wait'],
|
||||||
|
timeout=module.params['timeout'],
|
||||||
)
|
)
|
||||||
changed = True
|
changed = True
|
||||||
elif floating_ips:
|
elif floating_ips:
|
||||||
|
@ -508,7 +510,9 @@ def _check_floating_ips(module, cloud, server):
|
||||||
if ip not in ips:
|
if ip not in ips:
|
||||||
missing_ips.append(ip)
|
missing_ips.append(ip)
|
||||||
if missing_ips:
|
if missing_ips:
|
||||||
server = cloud.add_ip_list(server, missing_ips)
|
server = cloud.add_ip_list(server, missing_ips,
|
||||||
|
wait=module.params['wait'],
|
||||||
|
timeout=module.params['timeout'])
|
||||||
changed = True
|
changed = True
|
||||||
extra_ips = []
|
extra_ips = []
|
||||||
for ip in ips:
|
for ip in ips:
|
||||||
|
|
Loading…
Reference in a new issue