59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
---
|
|
# This role is used to set up the yaVDR remote control configuration.
|
|
|
|
- name: apt | install packages for remote support
|
|
apt:
|
|
name: '{{ item }}'
|
|
state: present
|
|
with_items:
|
|
- yavdr-remote
|
|
- lirc
|
|
- eventlircd
|
|
- lircd2uinput
|
|
tags:
|
|
- packages
|
|
|
|
- name: add systemd drop-in for lircd to use lircd2uinput
|
|
block:
|
|
- name: create directory /etc/systemd/system/lircd.service.d/
|
|
file:
|
|
path: /etc/systemd/system/lircd.service.d/
|
|
state: directory
|
|
- name: expand template for /etc/systemd/system/lircd.service.d/lircd2uinput.conf
|
|
template:
|
|
src: templates/lircd.service.d/lircd2uinput.conf.j2
|
|
dest: /etc/systemd/system/lircd.service.d/lircd2uinput.conf
|
|
tags:
|
|
- config
|
|
|
|
- name: stop, mask and disable lircd.socket, lircd.service, lircmd.service and lircd-uinput.service # (the default lirc configuration conflicts with eventlircd)
|
|
systemd:
|
|
name: '{{ item }}'
|
|
enabled: no
|
|
state: stopped
|
|
masked: yes
|
|
with_items:
|
|
- lircd.service
|
|
- lircd.socket
|
|
- lircmd.service
|
|
- lircd-uinput.service
|
|
ignore_errors: yes
|
|
tags:
|
|
- systemd
|
|
|
|
- name: configure vdr to read from a lircd-compatible socket
|
|
template:
|
|
src: templates/03-vdr-lirc.conf.j2
|
|
dest: /etc/vdr/conf.d/03-vdr-lirc.conf
|
|
notify: ['Restart VDR']
|
|
tags:
|
|
- config
|
|
|
|
- name: expand template for /etc/rc_maps.cfg
|
|
template:
|
|
src: templates/rc_maps.cfg.j2
|
|
dest: /etc/rc_maps.cfg
|
|
notify: ['Trigger Udev']
|
|
tags:
|
|
- config
|