2020-05-10 15:25:38 +02:00
|
|
|
---
|
2024-02-19 08:10:58 +01:00
|
|
|
- name: Install lirc
|
|
|
|
apt:
|
|
|
|
name: lirc
|
2020-05-10 15:25:38 +02:00
|
|
|
- name: Install config file lirc_options.conf
|
|
|
|
copy: src=lirc_options.conf dest=/etc/lirc/lirc_options.conf
|
|
|
|
- name: Install config file lircd.conf
|
|
|
|
copy: src=lircd.conf dest=/etc/lirc/lircd.conf
|
|
|
|
- name: Install remote file
|
|
|
|
copy: src=hauppauge.conf dest=/etc/lirc/hauppauge.conf
|
|
|
|
- name: Activate overlay in boot config
|
|
|
|
lineinfile:
|
2024-02-19 08:10:58 +01:00
|
|
|
path: /boot/firmware/config.txt
|
2020-05-10 15:25:38 +02:00
|
|
|
regexp: "^#?dtoverlay=gpio-ir"
|
|
|
|
line: "dtoverlay=gpio-ir,gpio_pin=17"
|
|
|
|
register: boot_overlay
|
|
|
|
- name: Restart lircd
|
|
|
|
systemd: name=lircd state=started enabled=yes daemon_reload=yes
|
|
|
|
- name: Reboot if boot overlay changed
|
|
|
|
reboot:
|
|
|
|
when: boot_overlay.changed
|
|
|
|
- name: Add to sysdweb
|
|
|
|
include_role:
|
|
|
|
name: pi-sysdweb
|
|
|
|
vars:
|
|
|
|
sysdweb_name: lircd
|