2017-11-18 10:27:59 +01:00
|
|
|
---
|
|
|
|
# file roles/autoinstall-dvbsky-firmware/tasks/main.yml
|
|
|
|
|
2017-11-18 11:45:31 +01:00
|
|
|
- name: determine needed firmware files by device ids
|
|
|
|
block:
|
2017-12-17 12:23:01 +01:00
|
|
|
- name: add firmware files for DVBSky if a card has been detected
|
2017-11-18 11:45:31 +01:00
|
|
|
set_fact:
|
2017-12-17 12:23:01 +01:00
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-m88ds3103.fw']"
|
2017-11-19 21:13:09 +01:00
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-m88rs6000.fw']"
|
2017-12-17 12:23:01 +01:00
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-si2168-a20-01.fw']"
|
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-si2168-a30-01.fw']"
|
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-si2168-b40-01.fw']"
|
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-fe-ds300x.fw']"
|
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-fe-ds3103.fw']"
|
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-fe-rs6000.fw']"
|
|
|
|
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-tuner-si2158-a20-01.fw']"
|
2017-11-18 11:45:31 +01:00
|
|
|
when:
|
|
|
|
- '"1ade:3038" in pci'
|
2017-11-18 10:27:59 +01:00
|
|
|
when:
|
2017-11-18 11:45:31 +01:00
|
|
|
- not dvbsky_firmware_files
|
2017-11-18 10:27:59 +01:00
|
|
|
|
|
|
|
- name: Download firmware for DVBSky cards and copy required files to /lib/firmware
|
|
|
|
block:
|
|
|
|
# download and extract firmware
|
|
|
|
- unarchive:
|
|
|
|
src: http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz
|
|
|
|
dest: /tmp/
|
|
|
|
remote_src: yes
|
|
|
|
|
|
|
|
# copy firmware file
|
|
|
|
- copy:
|
|
|
|
src: "/tmp/dvbsky-firmware/{{ item }}"
|
|
|
|
dest: /lib/firmware/
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
with_items: '{{ dvbsky_firmware_files }}'
|
2017-11-18 10:54:43 +01:00
|
|
|
notify: ['Trigger Udev']
|
2017-11-18 10:27:59 +01:00
|
|
|
|
|
|
|
# Remove temporary files
|
2017-11-18 10:48:50 +01:00
|
|
|
- file:
|
2017-11-18 10:56:24 +01:00
|
|
|
path: /tmp/dvbsky-firmware
|
|
|
|
state: absent
|
2017-11-18 10:27:59 +01:00
|
|
|
when:
|
|
|
|
- dvbsky_firmware_files is defined
|
2017-11-18 10:59:05 +01:00
|
|
|
- dvbsky_firmware_files
|
2017-11-18 10:27:59 +01:00
|
|
|
tags:
|
|
|
|
- install
|
|
|
|
- autodetect
|
|
|
|
- dvbsky
|