From 713e21efd6d79b0f320c69001fdbf16b671a520c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 17 Sep 2015 12:02:38 -0300 Subject: Split classes into files --- manifests/all.pp | 25 +++++++++++++++++++++++++ manifests/client.pp | 5 +++++ manifests/init.pp | 32 -------------------------------- 3 files changed, 30 insertions(+), 32 deletions(-) create mode 100644 manifests/all.pp create mode 100644 manifests/client.pp 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" ], - } -} -- cgit v1.2.3