Open
Description
SUMMARY
Changing Parameter "affinity_rule" after the creation of the rule, ansible will not see anything to change.
ISSUE TYPE
- Bug Report
COMPONENT NAME
vmware_vm_host_drs_rule
ANSIBLE VERSION
2.10
STEPS TO REPRODUCE
Create a vm_host_drs_rule. If the rule in the vcenter already exists, it will not check the parameter "affinity_rule". So should and should_not, must and must_not will not be checked. So it's not sure, the vm_host_drs_rule is configured correctly.
in the code, it's only checked if enabled state, rule_mandatory and group_names are correct, but not if the "affinity_rule" state is correct.
# Check if anything has changed
if (
(existing_rule["rule_enabled"] == self.__enabled)
and (existing_rule["rule_mandatory"] == self.__mandatory)
and (existing_rule["rule_vm_group_name"] == self.__vm_group_name)
and (
existing_rule["rule_affine_host_group_name"] == self.__host_group_name
or existing_rule["rule_anti_affine_host_group_name"]
== self.__host_group_name
)
):