Skip to content

sirboldilox/ansible-role-mpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible MPD

Ansible Galaxy

An Ansible role to manage MPD on debian systems.

  • Installs mpd and mpc.
  • Configures mpd.

Default variables

# 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"

Additional variables

# Database plugins
mpd_db_plugin

Example Playbook

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"

License

MIT

About

Ansible role for MPD

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published