Skip to content
Snippets Groups Projects
Commit 5dcbe294 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Fix all non-documentation related pdk warnings.

parent 5498dea0
No related branches found
No related tags found
No related merge requests found
define mpd::output ( define mpd::output (
Enum['shout', 'null', 'fifo', 'pipe', 'alsa', 'roar', 'ao', 'oss', Enum['shout', 'null', 'fifo', 'pipe', 'alsa', 'roar', 'ao', 'oss',
'openal', 'pulse', 'jack', 'httpd', 'recorder'] $type, 'openal', 'pulse', 'jack', 'httpd', 'recorder'] $type,
Optional[Hash] $parameters = {}, Hash $parameters = {},
) { ) {
require ::mpd::server require mpd::server
$base = { $base = {
type => $type, type => $type,
......
type Permission = Enum['read', 'add', 'control', 'admin']
type Password = Struct[{ name => String, permissions => Array[Permission]}]
type Metadata = Variant[Enum['none'],
Array[Enum['artist', 'album', 'title',
'track', 'name', 'genre',
'date', 'composer', 'performer',
'comment', 'disc']]]
# See mpd(5) along with https://mpd.readthedocs.io/en/stable/ # See mpd(5) along with https://mpd.readthedocs.io/en/stable/
# TODO # TODO
# audio_output, take mpd::output and get name # audio_output, take mpd::output and get name
...@@ -28,8 +18,8 @@ class mpd::server ( ...@@ -28,8 +18,8 @@ class mpd::server (
Enum['default','secure','verbose'] $log_level = 'default', Enum['default','secure','verbose'] $log_level = 'default',
Boolean $zeroconf_enabled = true, Boolean $zeroconf_enabled = true,
Optional[String] $zeroconf_name = undef, Optional[String] $zeroconf_name = undef,
Optional[Array[Password]] $password = undef, Optional[Array[Mpd::Password]] $password = undef,
Optional[Array[Permission]] $default_permissions = undef, Optional[Array[Mpd::Permission]] $default_permissions = undef,
Optional[String] $audio_output_format = undef, Optional[String] $audio_output_format = undef,
Optional[Variant[Integer,String]] $samplerate_converter = undef, Optional[Variant[Integer,String]] $samplerate_converter = undef,
Optional[Enum['off', 'album', 'track', 'auto']] $replaygain = undef, Optional[Enum['off', 'album', 'track', 'auto']] $replaygain = undef,
...@@ -49,14 +39,12 @@ class mpd::server ( ...@@ -49,14 +39,12 @@ class mpd::server (
Boolean $auto_update = true, Boolean $auto_update = true,
Optional[Integer] $auto_update_depth = undef, Optional[Integer] $auto_update_depth = undef,
) { ) {
concat { '/etc/mpd.conf': concat { '/etc/mpd.conf':
ensure => present, ensure => present,
} }
$hash = { $hash = {
music_directory => $music_directory, music_directory => $music_directory,
follow_outside_symlinks => $follow_outside_symlinks, follow_outside_symlinks => $follow_outside_symlinks,
follow_inside_symlinks => $follow_inside_symlinks, follow_inside_symlinks => $follow_inside_symlinks,
db_file => $db_file, db_file => $db_file,
...@@ -72,8 +60,6 @@ class mpd::server ( ...@@ -72,8 +60,6 @@ class mpd::server (
zeroconf_enabled => $zeroconf_enabled, zeroconf_enabled => $zeroconf_enabled,
save_absolute_paths_in_playlists => $save_absolute_paths_in_playlists, save_absolute_paths_in_playlists => $save_absolute_paths_in_playlists,
auto_update => $auto_update, auto_update => $auto_update,
zeroconf_name => $zeroconf_name, zeroconf_name => $zeroconf_name,
password => $password, password => $password,
default_permissions => $default_permissions, default_permissions => $default_permissions,
...@@ -91,7 +77,6 @@ class mpd::server ( ...@@ -91,7 +77,6 @@ class mpd::server (
auto_update_depth => $auto_update_depth, auto_update_depth => $auto_update_depth,
} }
concat::fragment { 'mpd_base_config': concat::fragment { 'mpd_base_config':
target => '/etc/mpd.conf', target => '/etc/mpd.conf',
content => $hash content => $hash
...@@ -103,7 +88,7 @@ class mpd::server ( ...@@ -103,7 +88,7 @@ class mpd::server (
} }
"${k} \"${val}\"\n" "${k} \"${val}\"\n"
} }
.join() .join(),
} }
service { 'mpd': service { 'mpd':
......
type Mpd::Metadata = Variant[
Enum['none'],
Array[Enum[
'artist', 'album', 'title',
'track', 'name', 'genre',
'date', 'composer', 'performer',
'comment', 'disc',
]]]
type Mpd::Password = Struct[{ name => String, permissions => Array[Mpd::Permission] }]
type Mpd::Permission = Enum['read', 'add', 'control', 'admin']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment