bacula::client::director_server: dinis.debian.org
bacula::client::storage_server: storace.debian.org
+roles::debsources::db_address: bmdb1.debian.org
+roles::debsources::db_port: 5440
+
# == other variables
#####################
))
| EOF
}
- ferm::rule { 'dsa-postgres-debsources':
- description => 'Allow postgress access to cluster: debsources',
- domain => '(ip ip6)',
- rule => @("EOF"/$)
- &SERVICE_RANGE(tcp, 5440, (
- ${ join(getfromhash($deprecated::allnodeinfo, 'sor.debian.org', 'ipHostNumber'), " ") }
- ))
- | EOF
- }
}
danzi: {
ferm::rule { 'dsa-postgres-tracker':
-class roles::debsources {
+# sources.debian.org role
+
+# @param db_address hostname of the postgres server for this service
+# @param db_port port of the postgres server for this service
+class roles::debsources (
+ String $db_address,
+ Integer $db_port,
+) {
include apache2
include apache2::ssl
notify => Exec['service apache2 reload'],
key => true,
}
+
+ @@postgres::cluster::hba_entry { 'debsources':
+ tag => "postgres::cluster::${db_port}::hba::${db_address}",
+ pg_port => $db_port,
+ database => 'debsources',
+ user => ['debsource_admin', 'debsource_updater'],
+ address => $base::public_addresses,
+ }
+
+ @@postgres::cluster::hba_entry { 'debsources-guest':
+ tag => "postgres::cluster::${db_port}::hba::${db_address}",
+ pg_port => $db_port,
+ database => 'debsources',
+ user => ['guest'],
+ method => 'trust',
+ address => $base::public_addresses,
+ }
}