summaryrefslogtreecommitdiff
path: root/puppet/modules/site_sshd/manifests
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-05-30 17:06:14 -0700
committerelijah <elijah@riseup.net>2013-05-30 17:06:14 -0700
commitc92d3ac0780e813a5440c5e475bfdba5de5a0447 (patch)
tree485c5df2038e4433db6087e50c9fc9af14a07aad /puppet/modules/site_sshd/manifests
parenta39f9981e7227b8e4668937a7bf0f658e1fbe8bd (diff)
site_sshd -- added xterm title, optional support for mosh
Diffstat (limited to 'puppet/modules/site_sshd/manifests')
-rw-r--r--puppet/modules/site_sshd/manifests/init.pp42
1 files changed, 41 insertions, 1 deletions
diff --git a/puppet/modules/site_sshd/manifests/init.pp b/puppet/modules/site_sshd/manifests/init.pp
index 630e9bdf..c1c4d3b3 100644
--- a/puppet/modules/site_sshd/manifests/init.pp
+++ b/puppet/modules/site_sshd/manifests/init.pp
@@ -1 +1,41 @@
-class site_sshd {}
+class site_sshd {
+ $ssh = hiera_hash('ssh')
+
+ ##
+ ## XTERM TITLE
+ ##
+
+ file {'/etc/profile.d/xterm-title.sh':
+ source => "puppet://$server/modules/site_sshd/xterm-title.sh",
+ owner => root, group => 0, mode => 0644;
+ }
+
+ ##
+ ## OPTIONAL MOSH SUPPORT
+ ##
+
+ $mosh = $ssh['mosh']
+ $mosh_ports = $mosh['ports']
+ if $ssh['mosh']['enabled'] {
+ $mosh_ensure = present
+ } else {
+ $mosh_ensure = absent
+ }
+
+ package { 'mosh':
+ ensure => $mosh_ensure;
+ }
+ file { '/etc/shorewall/macro.mosh':
+ ensure => $mosh_ensure,
+ content => "PARAM - - udp $mosh_ports",
+ notify => Service['shorewall'],
+ require => Package['shorewall'];
+ }
+ shorewall::rule { 'net2fw-mosh':
+ ensure => $mosh_ensure,
+ source => 'net',
+ destination => '$FW',
+ action => 'mosh(ACCEPT)',
+ order => 200;
+ }
+}