From 7dbe964de5458980602a1833b654060df236dc93 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Wed, 25 Apr 2018 17:54:54 +0530 Subject: [PATCH] We need to return virtual_facts after VMWare platform detection (#39149) (cherry picked from commit 4f36d7965e833a196281987312e27c2dffa05418) --- changelogs/fragments/facts_vmware_detection.yaml | 2 ++ lib/ansible/module_utils/facts/virtual/linux.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/facts_vmware_detection.yaml diff --git a/changelogs/fragments/facts_vmware_detection.yaml b/changelogs/fragments/facts_vmware_detection.yaml new file mode 100644 index 00000000000..2f903c3c0f6 --- /dev/null +++ b/changelogs/fragments/facts_vmware_detection.yaml @@ -0,0 +1,2 @@ +minor_changes: +- Return virtual_facts after VMware platform detection, otherwise we're falling back to 'NA' for virtualization type and virtualization role. diff --git a/lib/ansible/module_utils/facts/virtual/linux.py b/lib/ansible/module_utils/facts/virtual/linux.py index fece8d8f22b..819adfaaaf6 100644 --- a/lib/ansible/module_utils/facts/virtual/linux.py +++ b/lib/ansible/module_utils/facts/virtual/linux.py @@ -245,6 +245,7 @@ class LinuxVirtual(Virtual): if vendor_name.startwith('VMware'): virtual_facts['virtualization_type'] = 'VMware' virtual_facts['virtualization_role'] = 'guest' + return virtual_facts # If none of the above matches, return 'NA' for virtualization_type # and virtualization_role. This allows for proper grouping.