Puppet Class: ssh::client

Defined in:
modules/ssh/manifests/client.pp

Summary

class to managed ssh client config

Overview

Parameters:

  • manage_ssh_keys (Boolean) (defaults to: true)

    indicate if we should manage the known_hosts file

  • manage_ssh_config (Boolean) (defaults to: true)

    if true manage the /etc/ssh/ssh_config file, most other parameters are only valid if this is true

  • hash_known_hosts (Boolean) (defaults to: true)

    HashKnownHosts value

  • gss_api_authentication (Boolean) (defaults to: true)

    GSSAPIAuthentication value

  • gss_api_delegate_credentials (Boolean) (defaults to: false)

    GSSAPIDelegateCredentials value

  • send_env (Array[String[1]]) (defaults to: ['LANG', 'LC_*'])

    list of environment variables to send

  • known_hosts (Hash) (defaults to: {})

    a hash of known_hosts most likley generated from puppetdb



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
45
46
47
# File 'modules/ssh/manifests/client.pp', line 10

class ssh::client (
    Boolean          $manage_ssh_keys              = true,
    Boolean          $manage_ssh_config            = true,
    Boolean          $hash_known_hosts             = true,
    Boolean          $gss_api_authentication       = true,
    Boolean          $gss_api_delegate_credentials = false,
    Array[String[1]] $send_env                     = ['LANG', 'LC_*'],
    Hash             $known_hosts                  = {}
) {
    ensure_packages('openssh-client')

    file { '/etc/ssh':
        ensure => directory,
        owner  => 'root',
        group  => 'root',
        mode   => '0755',
    }

    if $manage_ssh_keys and wmflib::have_puppetdb() {
        file { '/etc/ssh/ssh_known_hosts':
            ensure  => file,
            content => template('ssh/known_hosts.erb'),
            backup  => false,
            owner   => 'root',
            group   => 'root',
            mode    => '0644',
        }
    }
    if $manage_ssh_config {
        file { '/etc/ssh/ssh_config':
            ensure  => file,
            owner   => 'root',
            group   => 'root',
            mode    => '0644',
            content => template('ssh/ssh_config.erb'),
        }
    }
}