Defined Type: profile::gerrit::sshkey

Defined in:
modules/profile/manifests/gerrit/sshkey.pp

Summary

small wrapper to manage the gerrit key

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • ensure (Wmflib::Ensure) (defaults to: 'present')

    ensurable param

  • exported (Boolean) (defaults to: false)

    wether to export the resource

  • override

    the default target

  • target (Optional[Stdlib::Unixpath]) (defaults to: undef)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'modules/profile/manifests/gerrit/sshkey.pp', line 6

define profile::gerrit::sshkey (
    Wmflib::Ensure             $ensure   = 'present',
    Boolean                    $exported = false,
    Optional[Stdlib::Unixpath] $target   = undef,
) {

    $params = {
        'ensure' => $ensure,
        'name'   => 'gerrit.wikimedia.org',
        'key'    => 'AAAAB3NzaC1yc2EAAAADAQABAAAAgQCF8pwFLehzCXhbF1jfHWtd9d1LFq2NirplEBQYs7AOrGwQ/6ZZI0gvZFYiEiaw1o+F1CMfoHdny1VfWOJF3mJ1y9QMKAacc8/Z3tG39jBKRQCuxmYLO1SWymv7/Uvx9WQlkNRoTdTTa9OJFy6UqvLQEXKYaokfMIUHZ+oVFf1CgQ==',
        'type'   => 'ssh-rsa',
        'target' => $target,
    }

    if $exported {
        @@sshkey { $title:
            * => $params,
        }
    } else {
        sshkey { $title:
            * => $params,
        }
    }
}