From 35b699b99c274f21b48aa8bc41b9aa1ef7802419 Mon Sep 17 00:00:00 2001 From: Rene Moser Date: Thu, 9 Jun 2016 22:54:25 +0200 Subject: [PATCH] cloudstack: cs_staticnat: fix static nat was always changed (disabled/enabled) Fixes firewall rules get lost after use of cs_staticnat. --- lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py b/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py index 6c1014c48e..956b171b32 100644 --- a/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py +++ b/lib/ansible/modules/extras/cloud/cloudstack/cs_staticnat.py @@ -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'])