]> gitweb.fluxo.info Git - puppet-mpd.git/commitdiff
Split classes into files
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 17 Sep 2015 15:02:38 +0000 (12:02 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 17 Sep 2015 15:02:38 +0000 (12:02 -0300)
manifests/all.pp [new file with mode: 0644]
manifests/client.pp [new file with mode: 0644]
manifests/init.pp

diff --git a/manifests/all.pp b/manifests/all.pp
new file mode 100644 (file)
index 0000000..3680464
--- /dev/null
@@ -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 (file)
index 0000000..2efeec0
--- /dev/null
@@ -0,0 +1,5 @@
+class mpd::client {
+  package { [ 'mpc', 'ncmpc', 'ncmpcpp', 'mpdtoys' ]:
+    ensure => installed,
+  }
+}
index 3c1761767712e30b6fd4f746a6e0c1aebb6852ac..a0a7268732f04d06193bdd3ad4aed1253b662677 100644 (file)
@@ -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" ],
-  }
-}