Puppet Class: profile::eventschemas::repositories

Defined in:
modules/profile/manifests/eventschemas/repositories.pp

Overview

SPDX-License-Identifier: Apache-2.0

Class profile::eventschemas::repositories

Clones all the provided event schema repositories using the eventschemas::repository define.

Parameters

repositories

Hash of repository $name -> git origin. Each of these will be cloned at /srv/eventschemas/repositories/$name Default:

'primary'   => 'schemas/event/primary',
'secondary' => 'schemas/event/secondary',

Parameters:

  • repositories (Hash[String, String]) (defaults to: lookup('profile::eventschemas::repositories', {default_value => { 'primary' => 'schemas/event/primary', 'secondary' => 'schemas/event/secondary', }}))


16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'modules/profile/manifests/eventschemas/repositories.pp', line 16

class profile::eventschemas::repositories(
    Hash[String, String] $repositories = lookup('profile::eventschemas::repositories', {default_value => {
        'primary'   => 'schemas/event/primary',
        'secondary' => 'schemas/event/secondary',
    }})
) {
    class { '::eventschemas': }

    keys($repositories).each |String $name| {
        eventschemas::repository { $name:
            origin => $repositories[$name]
        }
    }
}