From 45b45a4dbf609fea1b7d242f604a3ed60d80e4bc Mon Sep 17 00:00:00 2001 From: Maxence Date: Mon, 30 Aug 2021 03:47:06 +0000 Subject: [PATCH] Fix manageddisk caching comparison --- plugins/modules/azure_rm_manageddisk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/azure_rm_manageddisk.py b/plugins/modules/azure_rm_manageddisk.py index 584ed33fc..8e63a83be 100644 --- a/plugins/modules/azure_rm_manageddisk.py +++ b/plugins/modules/azure_rm_manageddisk.py @@ -481,7 +481,7 @@ def is_attach_caching_option_different(self, vm_name, disk): correspondence = next((d for d in vm.storage_profile.data_disks if d.name.lower() == disk.get('name').lower()), None) if correspondence and correspondence.caching.name != self.attach_caching: resp = True - if correspondence.caching.name == 'none' and self.attach_caching == '': + if correspondence.caching.name == 'none' and (self.attach_caching == '' or self.attach_caching is None): resp = False return resp