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:
parent
a5b8085113
commit
2397ca1a7e
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue