summaryrefslogtreecommitdiff
path: root/puppet/modules/site_sshd/manifests/init.pp
blob: 905d5c9b7053bc88f91fe9d0b9cecb1dbe5a6980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class site_sshd {
  $ssh = hiera_hash('ssh')

  ##
  ## SETUP AUTHORIZED KEYS
  ##

  $authorized_keys = $ssh['authorized_keys']

  class { 'site_sshd::authorized_keys':
    keys => $authorized_keys
  }

  ##
  ## OPTIONAL MOSH SUPPORT
  ##

  $mosh = $ssh['mosh']

  if $mosh['enabled'] {
    class { 'site_sshd::mosh':
      ensure => present,
      ports  => $mosh['ports']
    }
  }
  else {
    class { 'site_sshd::mosh':
      ensure => absent
    }
  }
}