1 # pet guest access to DB
3 # @param db_address hostname of the postgres server for this service
4 # @param db_port port of the postgres server for this service
5 # @param database list of databases to give access to
6 # @param address hosts to give access
7 # @param connection_type connection type
8 class roles::pet::db_guest_access (
9 String $db_address = $roles::pet::params::db_address,
10 Integer $db_port = $roles::pet::params::db_port,
11 Array[String] $database = ['pet'],
12 Enum['local', 'host', 'hostssl'] $connection_type = 'hostssl',
13 Optional[Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]] $address = $base::public_addresses,
14 ) inherits roles::pet::params {
15 @@postgres::cluster::hba_entry { "pet-guest-${::fqdn}":
16 tag => "postgres::cluster::${db_port}::hba::${db_address}",
18 database => $database,
21 connection_type => $connection_type,