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