mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 16:23:10 +00:00
Fix rax_find_loadbalancer issues
* Loadbalancer IDs are not UUIDs * Ensure found list exists before using it
This commit is contained in:
@@ -173,9 +173,9 @@ def rax_find_server(module, rax_module, server):
|
||||
def rax_find_loadbalancer(module, rax_module, loadbalancer):
|
||||
clb = rax_module.cloud_loadbalancers
|
||||
try:
|
||||
UUID(loadbalancer)
|
||||
found = clb.get(loadbalancer)
|
||||
except:
|
||||
found = []
|
||||
for lb in clb.list():
|
||||
if loadbalancer == lb.name:
|
||||
found.append(lb)
|
||||
|
||||
Reference in New Issue
Block a user