X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Fmanifests%2Fdirector.pp;h=9563749159dc73cf119af7ef4157c5e22632d523;hb=51c075b8a16d51f953a49a8cb1afd5b942424153;hp=3b62c59621bb18f499ae3d6852caf8d62e35955e;hpb=93aa8a665a0d34bfe7a16c4e65dbd4875feac197;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/manifests/director.pp b/modules/bacula/manifests/director.pp index 3b62c5962..956374915 100644 --- a/modules/bacula/manifests/director.pp +++ b/modules/bacula/manifests/director.pp @@ -1,5 +1,17 @@ # our bacula director -class bacula::director inherits bacula { +# +# @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 $db_address, + Integer $db_port, + String $db_name = 'bacula', + String $db_user = 'bacula', + Optional[String] $db_sslca = undef, +) inherits bacula { ensure_packages ( [ 'bacula-director-pgsql', @@ -55,7 +67,7 @@ class bacula::director inherits bacula { notify => Exec['bacula-director reload'] } - Bacula::Node<<| |>> + Bacula::Director::Client<<| tag == "bacula::to-director::${::fqdn}" |>> package { 'bacula-console': ensure => installed; @@ -113,9 +125,15 @@ class bacula::director inherits bacula { Concat::Fragment <<| tag == $bacula::tag_bacula_dsa_client_list |>> @@ferm::rule::simple { "bacula::director-to-fd::${::fqdn}": - tag => 'bacula::director-to-fd', + tag => "bacula::director-to-fd::${::fqdn}", description => 'Allow bacula-fd from the bacula-director', port => '7', # overridden on collecting saddr => $bacula::public_addresses, } + @@ferm::rule::simple { "bacula::director-to-storage::${::fqdn}": + tag => "bacula::director-to-storage::${::fqdn}", + description => 'Allow bacula-storage access from the bacula-director', + chain => 'bacula-sd', + saddr => $bacula::public_addresses, + } }