From ea1361a9273d4b31391f08eb7d7a5e3d44b6161e Mon Sep 17 00:00:00 2001 From: Elad Alfassa Date: Wed, 17 Jan 2018 23:32:54 +0200 Subject: [PATCH] modules/na_cdot_lun: properly compare LUN size (#34846) current_size is returned from the API as string, while self.size (the requested size) is an integer. This caused the comparison to always be False, and a resize request to always be sent. --- lib/ansible/modules/storage/netapp/na_cdot_lun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/storage/netapp/na_cdot_lun.py b/lib/ansible/modules/storage/netapp/na_cdot_lun.py index b545f15dc43..5304c8e7d9b 100644 --- a/lib/ansible/modules/storage/netapp/na_cdot_lun.py +++ b/lib/ansible/modules/storage/netapp/na_cdot_lun.py @@ -331,7 +331,7 @@ class NetAppCDOTLUN(object): property_changed = True elif self.state == 'present': - if not current_size == self.size: + if not int(current_size) == self.size: size_changed = True property_changed = True