aboutsummaryrefslogtreecommitdiff
path: root/manifests/client.pp
blob: 7dfe913f46731de6731ea9b5851e9380f920d7e0 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
# manifests/client.pp

class sshd::client {
    case $operatingsystem {
        debian: { include sshd::client::debian }
        default: { 
            case $kernel {
                linux: { include sshd::client::linux }
                default:  { include sshd::client::base }
            }
        }
    }
}

class sshd::client::base {

  case $sshd_ensure_version {
    '': { $sshd_ensure_version = "present" }
  }
  
  package{openssh-clients:
    ensure => $sshd_ensure_version,
  }

  # this is needed because the gid might have changed
  file { '/etc/ssh/ssh_known_hosts':
    mode => 0644, owner => root, group => 0;
  }
  
  # Now collect all server keys
  Sshkey <<||>>
}

class sshd::client::linux inherits sshd::client::base {
    package {'openssh-clients':
        ensure => installed,
    }
}

class sshd::client::debian inherits sshd::client::linux {
    Package['openssh-clients']{
        name => 'openssh-client',
    }
}