mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix ansible_virtualization_role fact on CloudLinux (#27191)
CloudLinux and OpenVZ have common roots, but CloudLinux does not really provide OS virtualization so it should not be regarded as a 'openvz' system. This change adds a check for the existance of the LVE kernel module which only exists on CloudLinux. Fixes: https://github.com/ansible/ansible/issues/26424
This commit is contained in:
parent
0a2df4cdaf
commit
5ccbe61258
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ class LinuxVirtual(Virtual):
|
|||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if os.path.exists('/proc/vz'):
|
||||
if os.path.exists('/proc/vz') and not os.path.exists('/proc/lve'):
|
||||
virtual_facts['virtualization_type'] = 'openvz'
|
||||
if os.path.exists('/proc/bc'):
|
||||
virtual_facts['virtualization_role'] = 'host'
|
||||
|
|
Loading…
Reference in a new issue