Skip to content

Commit

Permalink
Add 'samba::additional_config' option
Browse files Browse the repository at this point in the history
This allows the user of the module to specify arbitrary server
configuration options. For example, in hiera:

    samba::additional_config:
      server_multi_channel_support: yes
      aio_read_size: 1
      aio_write_size: 1
      min_receivefile_size: 16384
  • Loading branch information
parkr committed Jun 21, 2024
1 parent 5abd508 commit 4c6988b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ This module is designed to be as clean and compliant with latest puppet code gui
local_master => 'yes',
preferred_master => 'yes',
map_to_guest => 'Bad User',
additional_config => {
server_multi_channel_support => 'yes'
},
shares => {
'homes' => {
comment => 'Home Directories',
Expand Down Expand Up @@ -102,6 +105,8 @@ samba::local_master: 'yes'
samba::preferred_master: 'yes'
samba::map_to_guest: 'Bad User'
samba::firewall_manage: true
additional_config:
server_multi_channel_support: 'yes'
samba::shares:
'homes':
comment: 'Home Directories'
Expand Down
7 changes: 7 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
'obey pam restrictions': value => $samba::obey_pam_restrictions;
}

$samba::additional_config.each | $option, $value | {
$option_with_spaces = regsubst($option, '_', ' ', 'G')
samba::option { $option_with_spaces:
value => $value,
}
}

$samba::idmap_config.each | $idmap_domain, $idmap_options | {
$idmap_options.each | $idmap_option, $idmap_value | {
samba::option { "idmap config ${idmap_domain} : ${idmap_option}":
Expand Down

0 comments on commit 4c6988b

Please sign in to comment.