Skip to content

Instantly share code, notes, and snippets.

@tsuchm
Last active August 16, 2020 14:02
Show Gist options
  • Save tsuchm/88424f3f51ee35d293c3c0330bce3427 to your computer and use it in GitHub Desktop.
Save tsuchm/88424f3f51ee35d293c3c0330bce3427 to your computer and use it in GitHub Desktop.
Playbook to install VLC and libdvdcss2
- name: Check multimedia keyring
command: dpkg-query -W deb-multimedia-keyring
register: multimedia_keyring
changed_when: multimedia_keyring.rc == 1
failed_when: multimedia_keyring.rc > 1
check_mode: no
- name: Retrieve deb-multimedia-keyring
get_url:
url: http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
dest: /tmp/deb-multimedia-keyring_2016.8.1_all.deb
sha256sum: 9faa6f6cba80aeb69c9bac139b74a3d61596d4486e2458c2c65efe9e21ff3c7d
when: multimedia_keyring.changed
check_mode: no
- name: Install deb-multimedia-keyring_2016
apt:
deb: /tmp/deb-multimedia-keyring_2016.8.1_all.deb
allow_unauthenticated: true
when: multimedia_keyring.changed
- name: Enable multimedia repository
apt_repository:
repo: deb http://www.deb-multimedia.org {{ansible_distribution_release}} main non-free
filename: multimedia
- name: Install misc packages
apt:
name: ['vlc', 'libdvdcss2']
state: latest
update_cache: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment