- roles::people
roles::people::listen_addr: ['209.87.16.67', '2607:f8f0:614:1::1274:67']
+ssh::extraports: ['0.0.0.0:22', '[::]:22', '209.87.16.68:443', '[2607:f8f0:614:1::1274:68]:443']
-class ssh {
+# @param extraports Addresses/ports to listen on, in addition to 22
+class ssh (
+ Array[String] $extraports = [],
+) {
package { [ 'openssh-client', 'openssh-server']:
ensure => installed
}
##
Port 22
-<%= extraports = case @fqdn
- when "paradis.debian.org" then "
-ListenAddress 0.0.0.0:22
-ListenAddress [::]:22
-ListenAddress 209.87.16.68:443
-ListenAddress [2607:f8f0:614:1::1274:68]:443
-"
- end
-extraports
-%>
+<% @extraports.each do |port| -%>
+ListenAddress <%= $port %>
+<% end -%>
# Use these options to restrict which interfaces/protocols sshd will bind to
Protocol 2