diff options
Diffstat (limited to 'manifests/profile/base/sshd.pp')
-rw-r--r-- | manifests/profile/base/sshd.pp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/manifests/profile/base/sshd.pp b/manifests/profile/base/sshd.pp index 3f0245d..22520e9 100644 --- a/manifests/profile/base/sshd.pp +++ b/manifests/profile/base/sshd.pp @@ -31,11 +31,16 @@ # Hash of SSHD options to set. See the puppet-ssh module documentation for # details. # Defaults to {} +# +# [*port*] +# SSH port or list of ports to bind to +# Defaults to [22] class tripleo::profile::base::sshd ( $bannertext = hiera('BannerText', undef), $motd = hiera('MOTD', undef), - $options = {} + $options = {}, + $port = [22], ) { if $bannertext and $bannertext != '' { @@ -67,10 +72,18 @@ class tripleo::profile::base::sshd ( $sshd_options_motd = {} } + if $options['Port'] { + $sshd_options_port = {'Port' => unique(concat(any2array($options['Port']), $port))} + } + else { + $sshd_options_port = {'Port' => unique(any2array($port))} + } + $sshd_options = merge( $options, $sshd_options_banner, - $sshd_options_motd + $sshd_options_motd, + $sshd_options_port ) # NB (owalsh) in puppet-ssh hiera takes precedence over the class param |