2020-06-15 08:55:51 -05:00
|
|
|
#!/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
|
2020-06-16 08:58:38 -05:00
|
|
|
cache_valid_time: 86400
|
2020-06-15 08:55:51 -05:00
|
|
|
- name: Install packages
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- mpc
|
|
|
|
- mopidy
|
2020-06-15 08:59:28 -05:00
|
|
|
- mopidy-mpd
|
2020-06-15 08:55:51 -05:00
|
|
|
- mopidy-spotify
|
|
|
|
- name: Template out config
|
2020-06-16 09:53:01 -05:00
|
|
|
block:
|
|
|
|
- name: Create config directory
|
|
|
|
file:
|
|
|
|
path: "~/.config/mopidy"
|
|
|
|
state: directory
|
|
|
|
mode: "0755"
|
|
|
|
- name: Template out config
|
|
|
|
template:
|
|
|
|
src: mopidy.conf
|
|
|
|
mode: "0600"
|
|
|
|
dest: "~/.config/mopidy/mopidy.conf"
|
2020-06-15 08:55:51 -05:00
|
|
|
become_user: "{{ user_username }}"
|
|
|
|
become: yes
|
|
|
|
- name: Remove MPD
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- mpd
|
|
|
|
state: absent
|
|
|
|
become: yes
|