mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
When checking for Xen for LinuxHardware processor facts, don't check sysfs if already found in /proc/
This commit is contained in:
@@ -612,10 +612,10 @@ class LinuxHardware(Hardware):
|
|||||||
|
|
||||||
xen = False
|
xen = False
|
||||||
xen_paravirt = False
|
xen_paravirt = False
|
||||||
if os.path.exists('/proc/xen'):
|
|
||||||
xen = True
|
|
||||||
try:
|
try:
|
||||||
if open('/sys/hypervisor/type').readline().strip() == 'xen':
|
if os.path.exists('/proc/xen'):
|
||||||
|
xen = True
|
||||||
|
elif open('/sys/hypervisor/type').readline().strip() == 'xen':
|
||||||
xen = True
|
xen = True
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user