yavdr-ansible/roles/yavdr-remote/tasks/main.yml

45 lines
1.0 KiB
YAML

---
# This role is used to set up the yaVDR remote control configuration.
- name: apt | install yavdr-remote
apt:
name: yavdr-remote
state: present
- name: apt | install eventlircd
apt:
name: eventlircd
state: present
- name: apt | install lirc
apt:
name: lirc
state: present
- name: stop, mask and disable lircd.socket, lircd.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
- lircd-uinput.service
ignore_errors: yes
- 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']
# TODO: upload lircd2uinput package to PPA
#- name: install lircd2uinput
# tag: install
# apt:
# name: lircd2uinput
# state: present
# when:
# install_eventlircd is defined and install_eventlircd