mirror of
https://github.com/mdlayher/homelab.git
synced 2024-12-14 11:47:32 +00:00
mpd: initial commit
This commit is contained in:
parent
79cd699afe
commit
4700879728
4 changed files with 131 additions and 0 deletions
21
roles/mpd/tasks/main.yml
Normal file
21
roles/mpd/tasks/main.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- name: install mpd
|
||||
tags:
|
||||
- mpd
|
||||
apt:
|
||||
pkg: mpd
|
||||
state: installed
|
||||
|
||||
- name: create mpd configuration
|
||||
tags:
|
||||
- mpd
|
||||
template:
|
||||
src: mpd.conf.j2
|
||||
dest: "/etc/mpd.conf"
|
||||
|
||||
- name: restart mpd
|
||||
tags:
|
||||
- mpd
|
||||
service:
|
||||
name: mpd
|
||||
state: restarted
|
107
roles/mpd/templates/mpd.conf.j2
Executable file
107
roles/mpd/templates/mpd.conf.j2
Executable file
|
@ -0,0 +1,107 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
# An example configuration file for MPD
|
||||
# See the mpd.conf man page for a more detailed description of each parameter.
|
||||
|
||||
#
|
||||
# This setting controls the top directory which MPD will search to discover the
|
||||
# available audio files and add them to the daemon's online database. This
|
||||
# setting defaults to the XDG directory, otherwise the music directory will be
|
||||
# be disabled and audio files will only be accepted over ipc socket (using
|
||||
# file:// protocol) or streaming files over an accepted protocol.
|
||||
#
|
||||
music_directory "{{ mpd_music_directory }}"
|
||||
#
|
||||
# This setting sets the MPD internal playlist directory. The purpose of this
|
||||
# directory is storage for playlists created by MPD. The server will use
|
||||
# playlist files not created by the server but only if they are in the MPD
|
||||
# format. This setting defaults to playlist saving being disabled.
|
||||
#
|
||||
playlist_directory "/var/lib/mpd/playlists"
|
||||
#
|
||||
# This setting sets the location of the MPD database. This file is used to
|
||||
# load the database at server start up and store the database while the
|
||||
# server is not up. This setting defaults to disabled which will allow
|
||||
# MPD to accept files over ipc socket (using file:// protocol) or streaming
|
||||
# files over an accepted protocol.
|
||||
#
|
||||
db_file "/var/lib/mpd/tag_cache"
|
||||
#
|
||||
# These settings are the locations for the daemon log files for the daemon.
|
||||
# These logs are great for troubleshooting, depending on your log_level
|
||||
# settings.
|
||||
#
|
||||
# The special value "syslog" makes MPD use the local syslog daemon. This
|
||||
# setting defaults to logging to syslog, otherwise logging is disabled.
|
||||
#
|
||||
log_file "/var/log/mpd/mpd.log"
|
||||
#
|
||||
# This setting sets the location of the file which stores the process ID
|
||||
# for use of mpd --kill and some init scripts. This setting is disabled by
|
||||
# default and the pid file will not be stored.
|
||||
#
|
||||
pid_file "/run/mpd/pid"
|
||||
#
|
||||
# This setting sets the location of the file which contains information about
|
||||
# most variables to get MPD back into the same general shape it was in before
|
||||
# it was brought down. This setting is disabled by default and the server
|
||||
# state will be reset on server start up.
|
||||
#
|
||||
state_file "/var/lib/mpd/state"
|
||||
#
|
||||
# The location of the sticker database. This is a database which
|
||||
# manages dynamic information attached to songs.
|
||||
#
|
||||
sticker_file "/var/lib/mpd/sticker.sql"
|
||||
#
|
||||
|
||||
#
|
||||
# This setting specifies the user that MPD will run as. MPD should never run as
|
||||
# root and you may use this setting to make MPD change its user ID after
|
||||
# initialization. This setting is disabled by default and MPD is run as the
|
||||
# current user.
|
||||
#
|
||||
user "mpd"
|
||||
#
|
||||
|
||||
#
|
||||
# Bind to all interfaces using IPv4.
|
||||
#
|
||||
bind_to_address "0.0.0.0"
|
||||
|
||||
#
|
||||
# If this setting is set to "yes", service information will be published with
|
||||
# Zeroconf / Avahi.
|
||||
#
|
||||
zeroconf_enabled "yes"
|
||||
#
|
||||
# The argument to this setting will be the Zeroconf / Avahi unique name for
|
||||
# this MPD server on the network.
|
||||
#
|
||||
zeroconf_name "servnerr-2 mpd"
|
||||
#
|
||||
|
||||
#
|
||||
# Enable automatic update of music database when files change.
|
||||
#
|
||||
auto_update "yes"
|
||||
|
||||
#
|
||||
## An example of a null output (for no audio output):
|
||||
#
|
||||
audio_output {
|
||||
type "null"
|
||||
name "null"
|
||||
mixer_type "none" # optional
|
||||
}
|
||||
|
||||
#
|
||||
# If file or directory names do not display correctly for your locale then you
|
||||
# may need to modify this setting.
|
||||
#
|
||||
filesystem_charset "UTF-8"
|
||||
#
|
||||
# This setting controls the encoding that ID3v1 tags should be converted from.
|
||||
#
|
||||
id3v1_encoding "UTF-8"
|
||||
#
|
2
roles/mpd/vars/main.yml
Normal file
2
roles/mpd/vars/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
mpd_music_directory: "/primary/media/Music/FLAC"
|
|
@ -10,6 +10,7 @@
|
|||
- dropboxd
|
||||
- golang
|
||||
- grafana
|
||||
- mpd
|
||||
- nginx
|
||||
- node_exporter
|
||||
- plex
|
||||
|
|
Loading…
Reference in a new issue