Fix class name
[mirror/dsa-puppet.git] / modules / roles / manifests / postgresql / ftp_master_dak_replica / db_guest_access / ubc.pp
1 # ftp_master_dak_replica guest access to DB
2 #
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::postgresql::ftp_master_dak_replica::db_guest_access::ubc (
9   String  $db_address,
10   Integer $db_port,
11   Array[String] $database = ['projectb'],
12   Enum['local', 'host', 'hostssl'] $connection_type = 'hostssl',
13   Optional[Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]] $address = $base::public_addresses,
14 ) {
15   @@postgres::cluster::hba_entry { "dak-projectb-guest-${::fqdn}":
16     tag             => "postgres::cluster::${db_port}::hba::${db_address}",
17     pg_port         => $db_port,
18     database        => $database,
19     user            => 'guest',
20     address         => $address,
21     connection_type => $connection_type,
22     method          => 'trust',
23     order           => '25',
24   }
25 }