--- # file: roles/dvd/tasks/main.yml #- name: preconfigure libdvd-pkg # shell: | # echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections # echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections - name: apt | install libdvd-pkg apt: name: libdvd-pkg state: present install_recommends: no - name: reconfigure libdvd-pkg dpkg_reconfigure: pkg: libdvd-pkg answers: libdvd-pkg/post-invoke_hook-install: "boolean true" libdvd-pkg/build: "boolean true" - name: change udev rule to allow KODI to eject optical disks shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules args: creates: /etc/udev/rules.d/60-cdrom_id.rules warn: false