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.
This commit is contained in:
Gonéri Le Bouder 2019-04-11 16:13:14 -04:00
parent 541d73d82a
commit 93f0112953

View file

@ -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: