Fix unset ansible_virtualization_role (#39514)

Error was:
AttributeError("'str' object has no attribute 'startwith'",)

Closes #39138
pull/39873/head
Pilou 7 years ago committed by Abhijeet Kasurde
parent a5b8085113
commit 2397ca1a7e

@ -242,7 +242,7 @@ class LinuxVirtual(Virtual):
if rc == 0:
# Strip out commented lines (specific dmidecode output)
vendor_name = ''.join([line.strip() for line in out.splitlines() if not line.startswith('#')])
if vendor_name.startwith('VMware'):
if vendor_name.startswith('VMware'):
virtual_facts['virtualization_type'] = 'VMware'
virtual_facts['virtualization_role'] = 'guest'
return virtual_facts

Loading…
Cancel
Save