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:
parent
bc6c1afb1e
commit
12354869b9
1 changed files with 10 additions and 0 deletions
|
@ -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'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue