From 0e0735f10ecb64634a4a1c9ac78a36743295417d Mon Sep 17 00:00:00 2001 From: Aravind Balaji <40019860+AravindBalajiS@users.noreply.github.com> Date: Thu, 16 May 2019 11:51:36 +0530 Subject: [PATCH] VMware: Return facts about rule_affinity vmware_drs_rule_facts (#55813) Added the rule_affinity while returning about the rule facts --- lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py b/lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py index eefdbd0280..c9bd9992a1 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py +++ b/lib/ansible/modules/cloud/vmware/vmware_drs_rule_facts.py @@ -70,6 +70,7 @@ drs_rule_facts: sample: { "DC0_C0": [ { + "rule_affinity": false, "rule_enabled": true, "rule_key": 1, "rule_mandatory": true, @@ -182,6 +183,7 @@ class VmwareDrsFactManager(PyVmomi): rule_uuid=rule_obj.ruleUuid, rule_vms=[vm.name for vm in rule_obj.vm], rule_type="vm_vm_rule", + rule_affinity=True if isinstance(rule_obj, vim.cluster.AffinityRuleSpec) else False, ) def normalize_vm_host_rule_spec(self, rule_obj=None, cluster_obj=None):