mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 12:51:25 -07:00
Fix GCE and scaleway VM detection (#47193)
* Fix Google cloud engine & Scaleway VM detection
This commit is contained in:
parent
0dbac3f3b8
commit
aa484c0835
2 changed files with 12 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "facts - detect VMs from google cloud engine and scaleway"
|
|
@ -152,6 +152,16 @@ class LinuxVirtual(Virtual):
|
|||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if sys_vendor == 'Google':
|
||||
virtual_facts['virtualization_type'] = 'kvm'
|
||||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if sys_vendor == 'Scaleway':
|
||||
virtual_facts['virtualization_type'] = 'kvm'
|
||||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if os.path.exists('/proc/self/status'):
|
||||
for line in get_file_lines('/proc/self/status'):
|
||||
if re.match(r'^VxID:\s+\d+', line):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue