summaryrefslogtreecommitdiff
path: root/puppet/modules/site_sshd/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_sshd/manifests/init.pp')
-rw-r--r--puppet/modules/site_sshd/manifests/init.pp41
1 files changed, 14 insertions, 27 deletions
diff --git a/puppet/modules/site_sshd/manifests/init.pp b/puppet/modules/site_sshd/manifests/init.pp
index 714c0c5a..905d5c9b 100644
--- a/puppet/modules/site_sshd/manifests/init.pp
+++ b/puppet/modules/site_sshd/manifests/init.pp
@@ -1,16 +1,14 @@
class site_sshd {
$ssh = hiera_hash('ssh')
- $ssh_authorized_keys = $ssh['authorized_keys']
-
- include site_sshd::authorized_keys
##
- ## XTERM TITLE
+ ## SETUP AUTHORIZED KEYS
##
- file {'/etc/profile.d/xterm-title.sh':
- source => "puppet://$server/modules/site_sshd/xterm-title.sh",
- owner => root, group => 0, mode => 0644;
+ $authorized_keys = $ssh['authorized_keys']
+
+ class { 'site_sshd::authorized_keys':
+ keys => $authorized_keys
}
##
@@ -18,27 +16,16 @@ class site_sshd {
##
$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'];
+ if $mosh['enabled'] {
+ class { 'site_sshd::mosh':
+ ensure => present,
+ ports => $mosh['ports']
+ }
}
- shorewall::rule { 'net2fw-mosh':
- ensure => $mosh_ensure,
- source => 'net',
- destination => '$FW',
- action => 'mosh(ACCEPT)',
- order => 200;
+ else {
+ class { 'site_sshd::mosh':
+ ensure => absent
+ }
}
}