ansible/roles/desktop/tasks/mopidy.yml

47 lines
1.1 KiB
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
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