move variable dvbsky_firmware_files to role default

This commit is contained in:
Alexander Grothe 2017-11-18 11:45:31 +01:00
parent 636ff5722a
commit 51226ff994
2 changed files with 12 additions and 9 deletions

View File

@ -0,0 +1,3 @@
---
# file roles/autoinstall-dvbsky-firmware
dvbsky_firmware_files: []

View File

@ -1,16 +1,16 @@
--- ---
# file roles/autoinstall-dvbsky-firmware/tasks/main.yml # file roles/autoinstall-dvbsky-firmware/tasks/main.yml
- name: create empty list for dvbsky device firmware files - name: determine needed firmware files by device ids
set_fact: block:
dvbsky_firmware_files: [] - name: add firmware for DVBSky S952 V3 to variable dvbsky_firmware_files if a card has been detected
set_fact:
- name: add firmware for DVBSky S952 V3 to variable dvbsky_firmware_files if a card has been detected dvbsky_firmware_files: dvbsky_firmware_files + [ 'dvb-demod-m88rs6000.fw']
set_fact: when:
dvbsky_firmware_files: dvbsky_firmware_files + [ 'dvb-demod-m88rs6000.fw'] - '"1ade:3038" in pci'
- ansible_distribution_version >= '15.04' #driver only included since Kernel 3.19
when: when:
- '"1ade:3038" in pci' - not dvbsky_firmware_files
- ansible_distribution_version >= '15.04' #driver only included since Kernel 3.19
- name: Download firmware for DVBSky cards and copy required files to /lib/firmware - name: Download firmware for DVBSky cards and copy required files to /lib/firmware
block: block: