Dzahn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/172799
Change subject: ssh server: make listening port configurable
......................................................................
ssh server: make listening port configurable
Make the listening port of sshd configurable,
so we can be more flexible. Keep 22 as default.
Triggered by the comments on Id27657ca29e419 where
we want to have a setup with Gerrit listening on 22
and multiple IPs.
Change-Id: Iefbe62a2489cda577541fed651c5ccbf7effc029
---
M modules/ssh/manifests/server.pp
M modules/ssh/templates/sshd_config.erb
2 files changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/99/172799/1
diff --git a/modules/ssh/manifests/server.pp b/modules/ssh/manifests/server.pp
index dc1db63..56b93a9 100644
--- a/modules/ssh/manifests/server.pp
+++ b/modules/ssh/manifests/server.pp
@@ -1,4 +1,6 @@
-class ssh::server {
+class ssh::server (
+ $listen_port = '22',
+) {
package { 'openssh-server':
ensure => latest;
}
diff --git a/modules/ssh/templates/sshd_config.erb
b/modules/ssh/templates/sshd_config.erb
index 76580ab..64f19f4 100644
--- a/modules/ssh/templates/sshd_config.erb
+++ b/modules/ssh/templates/sshd_config.erb
@@ -3,7 +3,7 @@
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
-Port 22
+Port <%= listen_port %>
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
--
To view, visit https://gerrit.wikimedia.org/r/172799
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefbe62a2489cda577541fed651c5ccbf7effc029
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits