Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
50ef1bb9
Commit
50ef1bb9
authored
May 30, 2012
by
Dag Wieers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add BIOS information and fix VMware detection (supports both IDE and SCSI disks)
parent
af9651f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
library/setup
+4
-2
No files found.
library/setup
View file @
50ef1bb9
...
...
@@ -48,7 +48,9 @@ DMI_DICT = { 'form_factor': '/sys/devices/virtual/dmi/id/chassis_type',
'product_serial'
:
'/sys/devices/virtual/dmi/id/product_serial'
,
'product_uuid'
:
'/sys/devices/virtual/dmi/id/product_uuid'
,
'product_version'
:
'/sys/devices/virtual/dmi/id/product_version'
,
'system_vendor'
:
'/sys/devices/virtual/dmi/id/sys_vendor'
}
'system_vendor'
:
'/sys/devices/virtual/dmi/id/sys_vendor'
,
'bios_date'
:
'/sys/devices/virtual/dmi/id/bios_date'
,
'bios_version'
:
'/sys/devices/virtual/dmi/id/bios_version'
}
# From smolt and DMI spec
FORM_FACTOR
=
[
"Unknown"
,
"Other"
,
"Unknown"
,
"Desktop"
,
"Low Profile Desktop"
,
"Pizza Box"
,
"Mini Tower"
,
"Tower"
,
...
...
@@ -186,7 +188,7 @@ def get_linux_virtual_facts(facts):
facts
[
'virtualization_type'
]
=
'VMware'
facts
[
'virtualization_role'
]
=
'host'
# You can spawn a dmidecode process and parse that or infer from devices
for
dev_model
in
glob
.
glob
(
'/
proc/ide/hd*/model
'
):
for
dev_model
in
glob
.
glob
(
'/
sys/block/?da/device/vendor
'
):
info
=
open
(
dev_model
)
.
read
()
if
'VMware'
in
info
:
facts
[
'virtualization_type'
]
=
'VMware'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment