Defined Type: profile::maps::tilerator_user

Defined in:
modules/profile/manifests/maps/tilerator_user.pp

Overview

SPDX-License-Identifier: Apache-2.0

Create postgresql users for tilerator and tegola

This is extracted to reduce a bit of duplication and to be used as a pseudo loop with `create_resources`. It might make sense to refactor this once we activate puppet future parser. It might also make sense to expose higher level abstractions in the postgresql module itself.

Parameters:

  • ip_address (Stdlib::IP::Address)
  • password (String)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/profile/manifests/maps/tilerator_user.pp', line 10

define profile::maps::tilerator_user (
    Stdlib::IP::Address $ip_address,
    String $password,
) {
    if $ip_address =~ Stdlib::IP::Address::Nosubnet {
        $_ip_address = "${ip_address}/32"
    } else {
        $_ip_address = $ip_address
    }
    postgresql::user { "tilerator@${title}":
        user     => 'tilerator',
        password => $password,
        database => 'all',
        cidr     => $_ip_address,
    }
}