From 4c96c0a128d20e1a9aaef46ba569372ebe69dc4b Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 1 Jan 2018 22:51:57 +0100 Subject: [PATCH] Add role for automatic configuration of Atric IR-WakeupUSB to playbook --- Manual.org | 1 + roles/autoinstall-atric-usb/tasks/main.yml | 23 +++++++++++++++++++ .../templates/lircd_options.conf.j2 | 21 +++++++++++++++++ yavdr07.yml | 1 + 4 files changed, 46 insertions(+) create mode 100644 roles/autoinstall-atric-usb/tasks/main.yml create mode 100644 roles/autoinstall-atric-usb/templates/lircd_options.conf.j2 diff --git a/Manual.org b/Manual.org index 69f7675..0c007b5 100644 --- a/Manual.org +++ b/Manual.org @@ -186,6 +186,7 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation: - 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 + - autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards - kodi - dvd # set up packages and a udev rule to allow kodi and other players diff --git a/roles/autoinstall-atric-usb/tasks/main.yml b/roles/autoinstall-atric-usb/tasks/main.yml new file mode 100644 index 0000000..a1ab3f6 --- /dev/null +++ b/roles/autoinstall-atric-usb/tasks/main.yml @@ -0,0 +1,23 @@ +--- +# file roles/autoinstall-atric-usb/tasks/main.yml + +- name: install and configure Atric IR-WakeupUSB + block: + - name: apt | install lirc-drv-irman + apt: + name: lirc-drv-irman + + - name: write lirc configuration + template: + src: templates/lircd_options.conf.j2 + dest: /etc/lirc/lircd_options.conf + + - name: enable lircd + systemd: + name: lircd.service + enabled: yes + state: started + masked: no + daemon_reload: yes + + when: '"04d8:f844" in usb' diff --git a/roles/autoinstall-atric-usb/templates/lircd_options.conf.j2 b/roles/autoinstall-atric-usb/templates/lircd_options.conf.j2 new file mode 100644 index 0000000..e2b2290 --- /dev/null +++ b/roles/autoinstall-atric-usb/templates/lircd_options.conf.j2 @@ -0,0 +1,21 @@ +{{ ansible_managed_file | comment }} + +[lircd] +nodaemon = False +driver = irman +device = /dev/irman +output = /var/run/lirc/lircd0 +pidfile = /var/run/lirc/lircd0.pid +plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins +permission = 666 +allow-simulate = No +repeat-max = 600 +#loglevel = 6 +#release = true +#release_suffix = _EVUP +#logfile = ... +#driver-options = ... + +[lircmd] +uinput = False +nodaemon = False diff --git a/yavdr07.yml b/yavdr07.yml index c0f183a..4e5ed8f 100644 --- a/yavdr07.yml +++ b/yavdr07.yml @@ -27,6 +27,7 @@ - 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 + - autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards - kodi - dvd # set up packages and a udev rule to allow kodi and other players