aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem/sshd.pp
blob: fddf55290a9232185beda37ff707cdaf03312ed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class nodo::subsystem::sshd {
  $manage = lookup('nodo::subsystem::sshd::manage', undef, undef, true)

  if $manage == true {
    include ::sshd

    package { 'sshguard':
      ensure => present,
    }

    # Add the localhost ssh key, useful when one needs
    # to ssh to localhost.
    sshkey { [ 'localhost', '127.0.0.1' ]:
      type   => ssh-rsa,
      key    => $::sshrsakey,
      ensure => $::sshrsakey ? {
        ''      => absent,
        default => present,
      },
    }
  }
}