- '2a01:3f0:0:28::25'
# bacula
#
-bacula::director::bacula_db_address: 'postgresql-manda-01.debian.org'
-bacula::director::bacula_db_port: 5432
+bacula::director::db_address: 'postgresql-manda-01.debian.org'
+bacula::director::db_port: 5432
+bacula::director::db_sslca: '/etc/ssl/debian/certs/ca.crt'
# == other variables
# our bacula director
#
-# @param bacula_db_address hostname of the postgres server for the catalog DB
-# @param bacula_db_port port of the postgres server for the catalog DB
+# @param db_address hostname of the postgres server for the catalog DB
+# @param db_port port of the postgres server for the catalog DB
+# @param db_name DB name for the catalog DB
+# @param db_user username for the postgres server for the catalog DB
+# @param db_sslca SSL CA store for DB access
class bacula::director(
- String $bacula_db_address = 'postgresql-manda-01.debian.org',
- Integer $bacula_db_port = 5432,
+ String $db_address,
+ Integer $db_port,
+ String $db_name = 'bacula',
+ String $db_user = 'bacula',
+ Optional[String] $db_sslca = undef,
) inherits bacula {
ensure_packages ( [
########################################################################
Catalog {
Name = MyCatalog
- dbname = bacula;
- dbport = <%= @bacula_db_port %>;
- dbaddress = <%= @bacula_db_address %>;
+ dbname = <%= @db_name %>;
+ dbport = <%= @db_port %>;
+ dbaddress = "<%= @db_address %>";
dbsslmode = verify-ca;
- dbsslca = /etc/ssl/debian/certs/ca.crt;
- dbuser = "bacula";
+<% if @db_sslca %>
+ dbsslca = "<%= @db_sslca %>;
+<% end %>
+ dbuser = "<%= @db_user %>";
dbpassword = "<%= @bacula_db_secret %>"
}