An Ansible role to manage MPD on debian systems.
- Installs mpd and mpc.
- Configures mpd.
# Default settings for mpd
# Files and directories
mpd_music_directory: "/var/lib/mpd/music"
mpd_playlist_directory: "/var/lib/mpd/playlists"
mpd_db_file: "/var/lib/mpd/tag_cache"
mpd_state_file: "/var/lib/mpd/state"
mpd_sticker_file: "/var/lib/mpd/sticker.sql"
mpd_log_file: "/var/log/mpd/mpd.log"
mpd_pid_file: "/run/mpd/pid"
# General music daemon options
mpd_user: "mpd"
mpd_group: "audio"
# Audio devices (Default Null device)
mpd_audio_devices:
- name: "Auto Null Output"
type: "null"
# Database plugins
mpd_db_plugin
Basic playbook with pulse audio backend
- hosts: all
roles:
sirboldilox.mpd
vars:
- mpd_music_directory: "/media/music"
- mpd_audio_device:
- name: "Pulse Audio"
type: "pulse"
A more advanced playbook using a proxy database and HTTP stream
- hosts: all
roles:
sirboldilox.mpd
vars:
- mpd_music_directory: "/media/music"
- mpd_db_plugin:
plugin: "proxy"
host: "nas"
port: "6600"
- mpd_audio_device:
- name: "HTTP stream"
type: "httpd"
encoder: "lame"
port: "8081"
bitrate: "256"
tags: "yes"
MIT