summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-25 20:46:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-25 20:46:55 -0300
commit27254e40605e89efc7e9291b7831fb3810e40e9b (patch)
tree97795fbb30462f137e46799d8ac9691718bbe6ad /manifests
parent90b13d7e973a0584b27e02bebfa92e66a42505a1 (diff)
downloadpuppet-mpd-27254e40605e89efc7e9291b7831fb3810e40e9b.tar.gz
puppet-mpd-27254e40605e89efc7e9291b7831fb3810e40e9b.tar.bz2
Setup mpd and pulseaudio integration using tcp
Diffstat (limited to 'manifests')
-rw-r--r--manifests/all.pp20
1 files changed, 18 insertions, 2 deletions
diff --git a/manifests/all.pp b/manifests/all.pp
index 3680464..acf8188 100644
--- a/manifests/all.pp
+++ b/manifests/all.pp
@@ -10,8 +10,8 @@ class mpd::all {
groups => [ 'audio', 'pulse', 'pulse-access' ],
}
- # Ensure pulseaudio is running systemwide so both mpd and users
- # can share audio control.
+ # In the past we ensured pulseaudio were running systemwide
+ # so both mpd and users can share audio control.
#
# This could be managed elsewhere.
file { '/etc/default/pulseaudio':
@@ -22,4 +22,20 @@ class mpd::all {
notify => Service['mpd'],
source => [ "puppet:///modules/mpd/pulseaudio" ],
}
+
+ # When run as its own user as per the wiki instructions, mpd will be unable to
+ # send sound to another user's pulseaudio server. Rather than setting up
+ # pulseaudio as a system-wide daemon, a practice strongly discouraged by
+ # upstream, you can instead configure mpd to use pulseaudio's tcp module to send
+ # sound to localhost.
+ #
+ # See https://wiki.archlinux.org/index.php/Music_Player_Daemon/Tips_and_tricks#Local_.28with_separate_mpd_user.29
+ file { '/etc/pulse/default.pa':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ notify => Service['mpd'],
+ source => [ "puppet:///modules/mpd/default.pa" ],
+ }
}