From f441e2c1a94896d685cfc62ab5bb2329d66f3110 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 1 Aug 2016 08:33:09 -0500 Subject: [PATCH] Rename a confusing variable I had to read the two lines in question twice. That might just make me dumb, but if I'm dumb, someone else might be too. --- lib/ansible/modules/cloud/openstack/os_floating_ip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_floating_ip.py b/lib/ansible/modules/cloud/openstack/os_floating_ip.py index a4e3021877..d6b9ea4147 100644 --- a/lib/ansible/modules/cloud/openstack/os_floating_ip.py +++ b/lib/ansible/modules/cloud/openstack/os_floating_ip.py @@ -164,8 +164,8 @@ def main(): if state == 'present': # If f_ip already assigned to server, check that it matches # requirements. - f_ip = cloud.get_server_public_ip(server) - f_ip = _get_floating_ip(cloud, f_ip) if f_ip else f_ip + public_ip = cloud.get_server_public_ip(server) + f_ip = _get_floating_ip(cloud, public_ip) if public_ip else public_ip if f_ip: if network: network_id = cloud.get_network(name_or_id=network)["id"]