From 93f011295325bbb2a8607eea2d537ec6afaa6fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 11 Apr 2019 16:13:14 -0400 Subject: [PATCH] vmware_host_config_manager: do not apply an empty list of change In a multi-host context, `changed_list` will record all the changes done on any host. So as soon as ONE host is changed, it will be `True`. A host can potentially already have a parameter set, in this case `change_option_list` will be empty. This commit uses `change_option_list` instead of `changed_list` to decided if a given host should be updated. --- lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py b/lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py index 2e7e6ede4a9..6670bc7566d 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py +++ b/lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py @@ -164,7 +164,7 @@ class VmwareConfigManager(PyVmomi): changed_list.append(option_key) else: # Don't silently drop unknown options. This prevents typos from falling through the cracks. self.module.fail_json(msg="Unsupported option %s" % option_key) - if changed_list: + if change_option_list: if self.module.check_mode: changed_suffix = ' would be changed.' else: