1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix unset ansible_virtualization_role (#39514)

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

Closes #39138
This commit is contained in:
Pilou 2018-05-08 20:09:38 +02:00 committed by Abhijeet Kasurde
parent a5b8085113
commit 2397ca1a7e

View file

@ -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