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

Add xen guest detection on FreeBSD

This commit is contained in:
Michael Scherer 2016-11-06 12:27:45 +01:00 committed by Brian Coca
parent bc6c1afb1e
commit 12354869b9

View file

@ -3325,6 +3325,16 @@ class FreeBSDVirtual(Virtual):
""" """
platform = 'FreeBSD' platform = 'FreeBSD'
def get_virtual_facts(self):
# Set empty values as default
self.facts['virtualization_type'] = ''
self.facts['virtualization_role'] = ''
if os.path.exists('/dev/xen/xenstore'):
self.facts['virtualization_type'] = 'xen'
self.facts['virtualization_role'] = 'guest'
class DragonFlyVirtual(FreeBSDVirtual): class DragonFlyVirtual(FreeBSDVirtual):
platform = 'DragonFly' platform = 'DragonFly'