The code below sets the winbind auth flags only when you choose $winbind=true. Unfortunately, this prevents the module from disabling winbind and winbind authentications because the disable flags never get assigned.
this enables or disables winbind
$winbind_flg = $winbind ? {
true => '--enablewinbind',
default => '--disablewinbind',
}
Unfortunately, "--disablewinbind" never gets put into $winbind_flags because $winbind=false.
$winbind_flags = $winbind ? {
true => "${winbind_flg} ${winbindauth_flg} ${smbsecurity_val} ${smbrealm_val} ${smbworkgroup_val} ${winbindjoin_val} ${smbservers_val}",
default => '',
}
I would think that the enable/disable winbind flags should ALWAYS be assigned into $winbind_flags string and the true/false check in the second code snippet is unnecessary because we've already set the appropriate state in the first snippet.
The code below sets the winbind auth flags only when you choose $winbind=true. Unfortunately, this prevents the module from disabling winbind and winbind authentications because the disable flags never get assigned.
this enables or disables winbind
Unfortunately, "--disablewinbind" never gets put into $winbind_flags because $winbind=false.
I would think that the enable/disable winbind flags should ALWAYS be assigned into $winbind_flags string and the true/false check in the second code snippet is unnecessary because we've already set the appropriate state in the first snippet.