Puppet Class: ssh::publish_fingerprints

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

Overview

Parameters:

  • document_root (Stdlib::Unixpath)

    the document root to right fingerprints



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
# File 'modules/ssh/manifests/publish_fingerprints.pp', line 3

class ssh::publish_fingerprints (
    Stdlib::Unixpath $document_root,
) {
    $ssh_fingerprints = puppetdb::query_facts(['ssh', 'networking'])

    file{"${document_root}/ssh-fingerprints.txt":
        ensure  => file,
        backup  => false,  # Theses files change often don't back them up
        mode    => '0644',
        owner   => 'root',
        group   => 'root',
        content => template('ssh/publish_fingerprints/ssh-fingerprints.txt.erb'),
    }

    ['ecdsa', 'ed25519', 'rsa'].each |String $type| {
        file{"${document_root}/known_hosts.${type}":
            ensure  => file,
            backup  => false,  # Theses files change often don't back them up
            mode    => '0644',
            owner   => 'root',
            group   => 'root',
            content => template('ssh/publish_fingerprints/known_hosts.erb'),
        }
    }
}