cloudstack: cs_staticnat: fix static nat was always changed (disabled/enabled)

Fixes firewall rules get lost after use of cs_staticnat.
This commit is contained in:
Rene Moser 2016-06-09 22:54:25 +02:00 committed by Matt Clay
parent 43bee0b890
commit 35b699b99c

View file

@ -217,7 +217,7 @@ class AnsibleCloudStackStaticNat(AnsibleCloudStack):
# make an alias, so we can use _has_changed()
ip_address['vmguestip'] = ip_address['vmipaddress']
if self.has_changed(args, ip_address):
if self.has_changed(args, ip_address, ['vmguestip', 'virtualmachineid']):
self.result['changed'] = True
if not self.module.check_mode:
res = self.cs.disableStaticNat(ipaddressid=ip_address['id'])