Skip to content

Commit

Permalink
simpler default values
Browse files Browse the repository at this point in the history
  • Loading branch information
nod0n committed Jul 30, 2021
1 parent 8d406e0 commit cd886ad
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions manifests/jail.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,13 @@
define sftp_jail::jail (
$jail_name = $name,
$user = undef,
$group = undef,
$match_group = undef,
$group = $user,
$match_group = $group,
Boolean $password_authentication = $sftp_jail::password_authentication,
) {
include sftp_jail
$jail_base = "${sftp_jail::chroot_base}/${jail_name}"

if ($match_group) {
$ssh_match_group = $match_group
}
else {
$ssh_match_group = $group
}

if !($group) {
$group = $user
}

file { $jail_base:
ensure => 'directory',
owner => 'root',
Expand Down Expand Up @@ -103,7 +92,7 @@
require => File["${jail_base}/home"],
}

ssh::server::match_block { $ssh_match_group:
ssh::server::match_block { $match_group:
type => 'Group',
options => {
'ChrootDirectory' => $jail_base,
Expand Down

0 comments on commit cd886ad

Please sign in to comment.