summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-09-17 12:02:38 -0300
committerSilvio Rhatto <rhatto@riseup.net>2015-09-17 12:02:38 -0300
commit713e21efd6d79b0f320c69001fdbf16b671a520c (patch)
treeb595e139ede4063d1b58bf84dea19b8ff952b87a
parentdd87f6deba2a8908ac5ddf8cf1de8d45d49e49d3 (diff)
downloadpuppet-mpd-713e21efd6d79b0f320c69001fdbf16b671a520c.tar.gz
puppet-mpd-713e21efd6d79b0f320c69001fdbf16b671a520c.tar.bz2
Split classes into files
-rw-r--r--manifests/all.pp25
-rw-r--r--manifests/client.pp5
-rw-r--r--manifests/init.pp32
3 files changed, 30 insertions, 32 deletions
diff --git a/manifests/all.pp b/manifests/all.pp
new file mode 100644
index 0000000..3680464
--- /dev/null
+++ b/manifests/all.pp
@@ -0,0 +1,25 @@
+class mpd::all {
+ include mpd
+ include mpd::client
+
+ user { 'mpd':
+ ensure => present,
+ home => '/var/lib/mpd',
+ shell => '/bin/false',
+ gid => 'audio',
+ groups => [ 'audio', 'pulse', 'pulse-access' ],
+ }
+
+ # Ensure pulseaudio is running systemwide so both mpd and users
+ # can share audio control.
+ #
+ # This could be managed elsewhere.
+ file { '/etc/default/pulseaudio':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ notify => Service['mpd'],
+ source => [ "puppet:///modules/mpd/pulseaudio" ],
+ }
+}
diff --git a/manifests/client.pp b/manifests/client.pp
new file mode 100644
index 0000000..2efeec0
--- /dev/null
+++ b/manifests/client.pp
@@ -0,0 +1,5 @@
+class mpd::client {
+ package { [ 'mpc', 'ncmpc', 'ncmpcpp', 'mpdtoys' ]:
+ ensure => installed,
+ }
+}
diff --git a/manifests/init.pp b/manifests/init.pp
index 3c17617..a0a7268 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -21,35 +21,3 @@ class mpd {
"puppet:///modules/mpd/mpd.conf" ],
}
}
-
-class mpd::client {
- package { [ 'mpc', 'ncmpc', 'ncmpcpp', 'mpdtoys' ]:
- ensure => installed,
- }
-}
-
-class mpd::all {
- include mpd
- include mpd::client
-
- user { 'mpd':
- ensure => present,
- home => '/var/lib/mpd',
- shell => '/bin/false',
- gid => 'audio',
- groups => [ 'audio', 'pulse', 'pulse-access' ],
- }
-
- # Ensure pulseaudio is running systemwide so both mpd and users
- # can share audio control.
- #
- # This could be managed elsewhere.
- file { '/etc/default/pulseaudio':
- ensure => present,
- owner => root,
- group => root,
- mode => 0644,
- notify => Service['mpd'],
- source => [ "puppet:///modules/mpd/pulseaudio" ],
- }
-}