From a0c8b598ff7658eca6a9cd37842ae7b7e494ab89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Wed, 16 Nov 2016 22:18:06 +0100 Subject: [PATCH] cloudstack: fix state=absent, ip_address not None but falsy (#3483) --- lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py index 2a5e968cf18..13939d3fed9 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_ip_address.py @@ -208,8 +208,8 @@ class AnsibleCloudStackIPAddress(AnsibleCloudStack): def disassociate_ip_address(self): ip_address = self.get_ip_address() - if ip_address is None: - return ip_address + if not ip_address: + return None if ip_address['isstaticnat']: self.module.fail_json(msg="IP address is allocated via static nat")