Add some roles for autodetection of Hardware
This commit is contained in:
9
roles/autoinstall-dvbhddevice/tasks/main.yml
Normal file
9
roles/autoinstall-dvbhddevice/tasks/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# file roles/autoinstall-dvbhddevice/tasks/main.yml
|
||||
|
||||
- name: apt | install vdr-plugin-dvbhddevice if connected
|
||||
apt:
|
||||
name: vdr-plugin-dvbhddevice
|
||||
when:
|
||||
- '"13c2:300a" in ansible_local.hardware.pci'
|
||||
- '"13c2:300b" in ansible_local.hardware.pci'
|
8
roles/autoinstall-dvbsddevice/tasks/main.yml
Normal file
8
roles/autoinstall-dvbsddevice/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# file roles/autoinstall-dvbsddevice/tasks/main.yml
|
||||
|
||||
- name: apt | install vdr-plugin-dvbsddevice if module is loaded
|
||||
apt:
|
||||
name: vdr-plugin-dvbsddevice
|
||||
when:
|
||||
- '19c2:6a11" in ansible_local.modules'
|
9
roles/autoinstall-imonlcd/tasks/main.yml
Normal file
9
roles/autoinstall-imonlcd/tasks/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# file roles/autoinstall-imonlcd/tasks/main.yml
|
||||
|
||||
- name: apt | install vdr-plugin-imonlcd if connected
|
||||
apt:
|
||||
name: vdr-plugin-imonlcd
|
||||
when:
|
||||
- '"15c2:0038" in ansible_local.hardware.usb'
|
||||
- '"15c2:ffdc" in ansible_local.hardware.usb'
|
8
roles/autoinstall-libcecdaemon/tasks/main.yml
Normal file
8
roles/autoinstall-libcecdaemon/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# file roles/autoinstall-libcec-daemon/tasks/main.yml
|
||||
|
||||
- name: apt | install libcec-daemon if connected
|
||||
apt:
|
||||
name: libcec-daemon
|
||||
when:
|
||||
- '"2548:1002" in ansible_local.hardware.usb'
|
8
roles/autoinstall-pvr350/tasks/main.yml
Normal file
8
roles/autoinstall-pvr350/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# file roles/autoinstall-pvr350/tasks/main.yml
|
||||
|
||||
- name: apt | install vdr-plugin-pvr350 if connected
|
||||
apt:
|
||||
name: vdr-plugin-pvr350
|
||||
when:
|
||||
- '19c2:6a11" in ansible_local.hardware.pci'
|
12
roles/autoinstall-satip/tasks/main.yml
Normal file
12
roles/autoinstall-satip/tasks/main.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
# file roles/autoinstall-satip/tasks/main.yml
|
||||
|
||||
- name: Display all variables/facts known for a host
|
||||
debug:
|
||||
var: ansible_local
|
||||
verbosity: 1
|
||||
|
||||
- name: apt | install vdr-plugin-satip if a Sat>IP server has been detected
|
||||
apt:
|
||||
name: vdr-plugin-satip
|
||||
when: ansible_local.satip.satip_detected
|
8
roles/autoinstall-targavfd/tasks/main.yml
Normal file
8
roles/autoinstall-targavfd/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# file roles/autoinstall-targavfd/tasks/main.yml
|
||||
|
||||
- name: apt | install vdr-plugin-targavfd if connected
|
||||
apt:
|
||||
name: vdr-plugin-targavfd
|
||||
when:
|
||||
- '"19c2:6a11" in ansible_local.hardware.usb'
|
9
roles/yavdr-common/files/modules.fact.py
Executable file
9
roles/yavdr-common/files/modules.fact.py
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env python2
|
||||
# This script returns a list of currently loaded kernel modules
|
||||
from __future__ import print_function
|
||||
import json
|
||||
import kmodpy
|
||||
|
||||
k = kmodpy.Kmod()
|
||||
|
||||
print(json.dumps([module[0] for module in k.loaded()]))
|
@@ -32,6 +32,7 @@
|
||||
- biosdevname
|
||||
- linux-firmware
|
||||
- psmisc
|
||||
- python-kmodpy
|
||||
- python3-usb
|
||||
- software-properties-common
|
||||
- ssh
|
||||
@@ -48,13 +49,19 @@
|
||||
|
||||
- name: copy facts script for USB- and PCI(e)-IDs
|
||||
copy:
|
||||
src: files/hardware.facts.py
|
||||
src: files/hardware.fact.py
|
||||
dest: /etc/ansible/facts.d/hardware.fact
|
||||
mode: '0775'
|
||||
|
||||
- name: copy facts script for loaded modules
|
||||
copy:
|
||||
src: files/modules.fact.py
|
||||
dest: /etc/ansible/facts.d/modules.fact
|
||||
mode: '0775'
|
||||
|
||||
- name: copy facts script for Sat>IP server detection
|
||||
copy:
|
||||
src: files/satip.facts.py
|
||||
src: files/satip.fact.py
|
||||
dest: /etc/ansible/facts.d/satip.fact
|
||||
mode: '0775'
|
||||
|
||||
|
Reference in New Issue
Block a user