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

59 lines
1.5 KiB
YAML
Raw Normal View History

2017-02-19 13:56:47 +01:00
---
# This role is used to set up the yaVDR remote control configuration.
- name: apt | install packages for remote support
2017-02-19 13:56:47 +01:00
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
2017-02-19 13:56:47 +01:00
2018-01-18 09:35:32 +01:00
- 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
2018-01-18 09:35:32 +01:00
- lircmd.service
2017-07-16 10:17:08 +02:00
- 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
2017-07-16 09:21:35 +02:00
notify: ['Restart VDR']
tags:
- config
2017-12-19 12:32:37 +01:00
- 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