Skip to content
Snippets Groups Projects
Commit 2be0d813 authored by drebs's avatar drebs
Browse files

Pass SSH port as an integer

parent c2985561
Branches fixes-after-monitoring-deploy
No related tags found
No related merge requests found
Pipeline #63160 passed
# SSH service # SSH service
class profile::sshd ( class profile::sshd (
String $ssh_port = '22', Integer $ssh_port = 22,
Boolean $permit_root_login = false, Boolean $permit_root_login = false,
) { ) {
firewall { '100 allow SSH access': firewall { '100 allow SSH access':
dport => $ssh_port, dport => String($ssh_port),
proto => 'tcp', proto => 'tcp',
action => 'accept', action => 'accept',
} }
...@@ -16,7 +16,7 @@ class profile::sshd ( ...@@ -16,7 +16,7 @@ class profile::sshd (
options => { options => {
'PasswordAuthentication' => 'no', 'PasswordAuthentication' => 'no',
'PermitRootLogin' => $permit_root_login_str, 'PermitRootLogin' => $permit_root_login_str,
'Port' => [ $ssh_port ], 'Port' => [ String($ssh_port) ],
'X11Forwarding' => 'no', 'X11Forwarding' => 'no',
}, },
} }
...@@ -24,7 +24,7 @@ class profile::sshd ( ...@@ -24,7 +24,7 @@ class profile::sshd (
include tor include tor
tor::daemon::onion_service { 'ssh': tor::daemon::onion_service { 'ssh':
ports => [ $ssh_port ], ports => [ String($ssh_port) ],
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment