summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/output.pp14
-rw-r--r--manifests/server.pp2
2 files changed, 8 insertions, 8 deletions
diff --git a/manifests/output.pp b/manifests/output.pp
index b67b0ec..e532567 100644
--- a/manifests/output.pp
+++ b/manifests/output.pp
@@ -5,16 +5,16 @@ define mpd::output (
) {
require ::mpd::server
- $content_base = @("EOF")
- audio_output {
- type "${type}"
- name "${name}"
- | EOF
+ $base = {
+ type => $type,
+ name => $name,
+ }
+ $params = $base + $parameters
- $content_aux = $parameters.map |$k, $v| { "${k} \"${v}\"\n" }.join()
+ $content_aux = $params.map |$k, $v| { " ${k} \"${v}\"\n" }.join()
concat::fragment { "mpd audio ${name}":
target => '/etc/mpd.conf',
- content => "${content_base}${content_aux}}\n",
+ content => "audio_output {\n${content_aux}}\n",
}
}
diff --git a/manifests/server.pp b/manifests/server.pp
index 390231e..a3e6088 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -8,7 +8,7 @@ type Metadata = Variant[Enum['none'],
'date', 'composer', 'performer',
'comment', 'disc']]]
-# See mpd(5)
+# See mpd(5) along with https://mpd.readthedocs.io/en/stable/
# TODO
# audio_output, take mpd::output and get name
class mpd::server (