38 lines
882 B
YAML
38 lines
882 B
YAML
#!/usr/bin/ansible-playbook
|
|
# vim:ft=ansible:
|
|
---
|
|
- name: Configure system packages
|
|
block:
|
|
- name: Add mopidy repo key
|
|
apt_key:
|
|
url: "https://apt.mopidy.com/mopidy.gpg"
|
|
- name: Add repos
|
|
apt_repository:
|
|
repo: "{{ item }}"
|
|
loop:
|
|
# These repos work for Buster and >=19.10
|
|
- "deb https://apt.mopidy.com/ buster main contrib non-free"
|
|
- "deb-src https://apt.mopidy.com/ buster main contrib non-free"
|
|
- name: Update APT cache
|
|
apt:
|
|
update_cache: yes
|
|
- name: Install packages
|
|
apt:
|
|
name:
|
|
- mpc
|
|
- mopidy
|
|
- mopidy-spotify
|
|
- name: Template out config
|
|
template:
|
|
src: mopidy.conf
|
|
mode: "0600"
|
|
dest: "~/.config/mopidy/mopidy.conf"
|
|
become_user: "{{ user_username }}"
|
|
become: yes
|
|
- name: Remove MPD
|
|
apt:
|
|
name:
|
|
- mpd
|
|
state: absent
|
|
become: yes
|