--- - name: Install lirc apt: name: lirc - 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: path: /boot/firmware/config.txt 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