ansible/roles/desktop/tasks/mopidy.yml

40 lines
933 B
YAML
Raw Normal View History

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
cache_valid_time: 86400
2020-06-15 08:55:51 -05:00
- name: Install packages
apt:
name:
- mpc
- mopidy
- mopidy-mpd
2020-06-15 08:55:51 -05:00
- mopidy-spotify
- name: Template out config
template:
src: mopidy.conf
2020-06-15 08:58:03 -05:00
mode: "0600"
2020-06-15 08:55:51 -05:00
dest: "~/.config/mopidy/mopidy.conf"
become_user: "{{ user_username }}"
become: yes
- name: Remove MPD
apt:
name:
- mpd
state: absent
become: yes