cloudstack: cs_ip_address: fix returns on state=present (#3406)

In case poll_job=false the return must be None
This commit is contained in:
René Moser 2016-11-10 16:04:11 +01:00 committed by Matt Clay
parent 0324d7a681
commit de3aea7c36

View file

@ -202,8 +202,7 @@ class AnsibleCloudStackIPAddress(AnsibleCloudStack):
poll_async = self.module.params.get('poll_async')
if poll_async:
res = self.poll_job(res, 'ipaddress')
ip_address = res
ip_address = self.poll_job(res, 'ipaddress')
return ip_address