From 2cb83fb1967f4ca947c82d144b4c722499870a48 Mon Sep 17 00:00:00 2001 From: Hideki Saito Date: Fri, 31 Oct 2014 18:25:34 +0900 Subject: [PATCH] The nova_compute module create a list of un-use floating ip by value of fixed_ip. Fixes #249 --- lib/ansible/modules/cloud/openstack/_nova_compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/openstack/_nova_compute.py b/lib/ansible/modules/cloud/openstack/_nova_compute.py index 83b3efe59c2..f4846058b9f 100644 --- a/lib/ansible/modules/cloud/openstack/_nova_compute.py +++ b/lib/ansible/modules/cloud/openstack/_nova_compute.py @@ -321,7 +321,7 @@ def _add_floating_ip_from_pool(module, nova, server): # loop through all floating IPs for f_ip in all_floating_ips: # if not reserved and the correct pool, add - if f_ip.instance_id is None and (f_ip.pool == pool): + if f_ip.fixed_ip is None and (f_ip.pool == pool): pool_ips.append(f_ip.ip) # only need one break