add xorg configuration and driver autodetection
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
#!/usr/bin/env python
|
||||
|
||||
# This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules.
|
||||
@@ -65,7 +66,7 @@ import kmodpy
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
|
||||
PCIDevice = namedtuple("PCIDevice", ['idVendor', 'idProduct', 'idClass'])
|
||||
PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath')
|
||||
|
||||
def get_pci_devices():
|
||||
for device in glob.glob('/sys/devices/pci*/*:*:*/'):
|
||||
@@ -75,7 +76,7 @@ def get_pci_devices():
|
||||
vendor_id = int(d.read().strip(), 16)
|
||||
with open(os.path.join(device, 'class')) as d:
|
||||
class_id = int(d.read().strip(), 16)
|
||||
yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id)
|
||||
yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device)
|
||||
|
||||
def format_device_list(iterator):
|
||||
return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#!/usr/bin/env python2
|
||||
|
||||
DOCUMENTATION = '''
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#!/usr/bin/env python2
|
||||
from __future__ import print_function
|
||||
import ast
|
||||
@@ -42,6 +43,11 @@ options:
|
||||
default: ["7680x4320", "3840x2160", "1920x1080", "1280x720", "720x576"]
|
||||
description:
|
||||
- ranking of the preferred display resolutions
|
||||
write_edids:
|
||||
required: False
|
||||
default: True
|
||||
description:
|
||||
- write edid data to /etc/X11/edid.{connector}.bin
|
||||
'''
|
||||
EXAMPLES = '''
|
||||
- name: "collect facts for connected displays"
|
||||
|
||||
Reference in New Issue
Block a user