diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 6c0049649ff..24014081407 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -3259,6 +3259,11 @@ class LinuxVirtual(Virtual): self.facts['virtualization_role'] = 'guest' return + if product_name == 'OpenStack Nova': + self.facts['virtualization_type'] = 'openstack' + self.facts['virtualization_role'] = 'guest' + return + bios_vendor = get_file_content('/sys/devices/virtual/dmi/id/bios_vendor') if bios_vendor == 'Xen': @@ -3294,6 +3299,11 @@ class LinuxVirtual(Virtual): self.facts['virtualization_role'] = 'guest' return + if sys_vendor == 'OpenStack Foundation': + self.facts['virtualization_type'] = 'openstack' + self.facts['virtualization_role'] = 'guest' + return + if os.path.exists('/proc/self/status'): for line in get_file_lines('/proc/self/status'): if re.match('^VxID: \d+', line):