From 896516242be65023732ee0727d81247c8f77487e Mon Sep 17 00:00:00 2001 From: Luigi Di Carmino Date: Sun, 12 Nov 2017 21:31:18 +0100 Subject: [PATCH 1/9] yavdr-hardware-irmp added --- roles/autoinstall-hardware-irmp/tasks/main.yml | 7 +++++++ yavdr07.yml | 1 + 2 files changed, 8 insertions(+) create mode 100755 roles/autoinstall-hardware-irmp/tasks/main.yml mode change 100644 => 100755 yavdr07.yml diff --git a/roles/autoinstall-hardware-irmp/tasks/main.yml b/roles/autoinstall-hardware-irmp/tasks/main.yml new file mode 100755 index 0000000..cfb5a99 --- /dev/null +++ b/roles/autoinstall-hardware-irmp/tasks/main.yml @@ -0,0 +1,7 @@ +--- +# file roles/autoinstall-hardware-irmp/tasks/main.yml + +- name: apt | install yavdr-hardware-irmp if connected + apt: + name: yavdr-hardware-irmp + when: '"1209:4444" in usb' diff --git a/yavdr07.yml b/yavdr07.yml old mode 100644 new mode 100755 index 0ecb558..cd3f0ea --- a/yavdr07.yml +++ b/yavdr07.yml @@ -24,6 +24,7 @@ - autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected + - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device was detected - kodi - dvd # set up packages and a udev rule to allow kodi and other players # to play and eject optical media From 36d189e31cb716bf51c3094bdcbab4c6c808bb92 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:00:53 +0100 Subject: [PATCH 2/9] Update Manual.org, fix file permissions for role --- Manual.org | 14 ++++++++++++++ roles/autoinstall-hardware-irmp/tasks/main.yml | 0 2 files changed, 14 insertions(+) mode change 100755 => 100644 roles/autoinstall-hardware-irmp/tasks/main.yml diff --git a/Manual.org b/Manual.org index 6ef747e..42140d3 100644 --- a/Manual.org +++ b/Manual.org @@ -3250,6 +3250,20 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll when: '"dvb_ttpci" in modules' notify: [ 'Restart VDR' ] #+END_SRC +** autoinstall-hardware-irmp +*** tasks +#+BEGIN_SRC yaml :tangle roles/autoinstall-hardware-irmp/tasks/main.yml :padline no +--- +# file roles/autoinstall-hardware-irmp/tasks/main.yml + +- name: apt | install yavdr-hardware-irmp if connected + apt: + name: yavdr-hardware-irmp + when: '"1209:4444" in usb' +#+END_SRC + +**** TODO add other device ids if necessary + ** kodi *** tasks **** Install KODI diff --git a/roles/autoinstall-hardware-irmp/tasks/main.yml b/roles/autoinstall-hardware-irmp/tasks/main.yml old mode 100755 new mode 100644 From 9794d7b9efc16884a17d1f7312b9aeaa536829cf Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:03:02 +0100 Subject: [PATCH 3/9] Update Manual.conf --- Manual.org | 1 + yavdr07.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100755 => 100644 yavdr07.yml diff --git a/Manual.org b/Manual.org index 42140d3..13cdb8d 100644 --- a/Manual.org +++ b/Manual.org @@ -183,6 +183,7 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation: - autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected + - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected - kodi - dvd # set up packages and a udev rule to allow kodi and other players # to play and eject optical media diff --git a/yavdr07.yml b/yavdr07.yml old mode 100755 new mode 100644 index cd3f0ea..4938a2b --- a/yavdr07.yml +++ b/yavdr07.yml @@ -24,7 +24,7 @@ - autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected - - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device was detected + - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected - kodi - dvd # set up packages and a udev rule to allow kodi and other players # to play and eject optical media From ca0bc806ca2da76d7ef96cb56afe4afe2265d820 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:14:11 +0100 Subject: [PATCH 4/9] use debconf module instead of shell command --- roles/dvd/tasks/main.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/roles/dvd/tasks/main.yml b/roles/dvd/tasks/main.yml index 4f7a37f..fb479ba 100644 --- a/roles/dvd/tasks/main.yml +++ b/roles/dvd/tasks/main.yml @@ -1,10 +1,10 @@ --- # file: roles/dvd/tasks/main.yml -- name: preconfigure libdvd-pkg - shell: | - echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections - echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections +#- name: preconfigure libdvd-pkg +# shell: | +# echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections +# echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections - name: apt | install libdvd-pkg apt: @@ -14,6 +14,16 @@ with_items: - libdvd-pkg +- name: configure package libdvd-pkg + debconf: + name: 'libdvd-pkg' + question: '{{ item }}' + vtype: boolean + value: true + - with_items: + - libdvd-pkg/post-invoke_hook-install + - libdvd-pkg/build boolean + - name: change udev rule to allow KODI to eject optical disks shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules args: From 9d1eb3a6e35a229bd5bde21df11aee93d52ff104 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:14:11 +0100 Subject: [PATCH 5/9] use debconf module instead of shell command --- roles/dvd/tasks/main.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/roles/dvd/tasks/main.yml b/roles/dvd/tasks/main.yml index 4f7a37f..4fa8e44 100644 --- a/roles/dvd/tasks/main.yml +++ b/roles/dvd/tasks/main.yml @@ -1,10 +1,10 @@ --- # file: roles/dvd/tasks/main.yml -- name: preconfigure libdvd-pkg - shell: | - echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections - echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections +#- name: preconfigure libdvd-pkg +# shell: | +# echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections +# echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections - name: apt | install libdvd-pkg apt: @@ -14,6 +14,16 @@ with_items: - libdvd-pkg +- name: configure package libdvd-pkg + debconf: + name: 'libdvd-pkg' + question: '{{ item }}' + vtype: boolean + value: true + with_items: + - libdvd-pkg/post-invoke_hook-install + - libdvd-pkg/build boolean + - name: change udev rule to allow KODI to eject optical disks shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules args: From 03584030735c54b9ff6eb55e6a108b3e08828be6 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:24:13 +0100 Subject: [PATCH 6/9] fix indentation and quoting --- roles/dvd/tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/dvd/tasks/main.yml b/roles/dvd/tasks/main.yml index 4fa8e44..ec07f1d 100644 --- a/roles/dvd/tasks/main.yml +++ b/roles/dvd/tasks/main.yml @@ -12,7 +12,7 @@ state: present install_recommends: no with_items: - - libdvd-pkg + - 'libdvd-pkg' - name: configure package libdvd-pkg debconf: @@ -20,9 +20,9 @@ question: '{{ item }}' vtype: boolean value: true - with_items: - - libdvd-pkg/post-invoke_hook-install - - libdvd-pkg/build boolean + with_items: + - 'libdvd-pkg/post-invoke_hook-install' + - 'libdvd-pkg/build boolean' - name: change udev rule to allow KODI to eject optical disks shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules From c985a332291fadd6077e876965de13df4d3c426d Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:27:02 +0100 Subject: [PATCH 7/9] run dpkg-reconfigure if necessary --- Manual.org | 3 +++ roles/dvd/tasks/main.yml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Manual.org b/Manual.org index 13cdb8d..bf57427 100644 --- a/Manual.org +++ b/Manual.org @@ -4131,6 +4131,9 @@ if __name__ == '__main__': #+END_SRC * Handlers #+BEGIN_SRC yaml :tangle handlers/main.yml :mkdirp yes +- name: Reconfigure unattended upgrades with dpkg + command: '/usr/sbin/dpkg-reconfigure --frontend noninteractive unattended-upgrades' + - name: Restart Samba systemd: name: smbd.service diff --git a/roles/dvd/tasks/main.yml b/roles/dvd/tasks/main.yml index ec07f1d..ebbb462 100644 --- a/roles/dvd/tasks/main.yml +++ b/roles/dvd/tasks/main.yml @@ -23,7 +23,8 @@ with_items: - 'libdvd-pkg/post-invoke_hook-install' - 'libdvd-pkg/build boolean' - + notify: ['Reconfigure unattended upgrades with dpkg'] + - name: change udev rule to allow KODI to eject optical disks shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules args: From 7c2b1ce55d86d733dda7ef7551453ec0c15aa748 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:30:42 +0100 Subject: [PATCH 8/9] update handlers --- handlers/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handlers/main.yml b/handlers/main.yml index 840b674..639af8c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,3 +1,6 @@ +- name: Reconfigure unattended upgrades with dpkg + command: '/usr/sbin/dpkg-reconfigure --frontend noninteractive unattended-upgrades' + - name: Restart Samba systemd: name: smbd.service From fbad7b65aa70cc8132dada7494c8f31df9fd31bb Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 13 Nov 2017 09:44:42 +0100 Subject: [PATCH 9/9] remove whitespace --- Manual.org | 2 +- handlers/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Manual.org b/Manual.org index bf57427..4629e94 100644 --- a/Manual.org +++ b/Manual.org @@ -4133,7 +4133,7 @@ if __name__ == '__main__': #+BEGIN_SRC yaml :tangle handlers/main.yml :mkdirp yes - name: Reconfigure unattended upgrades with dpkg command: '/usr/sbin/dpkg-reconfigure --frontend noninteractive unattended-upgrades' - + - name: Restart Samba systemd: name: smbd.service diff --git a/handlers/main.yml b/handlers/main.yml index 639af8c..9c5887a 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,6 +1,6 @@ - name: Reconfigure unattended upgrades with dpkg command: '/usr/sbin/dpkg-reconfigure --frontend noninteractive unattended-upgrades' - + - name: Restart Samba systemd: name: smbd.service