From: Peter Palfrader Date: Tue, 24 Sep 2019 21:31:05 +0000 (+0200) Subject: start with moving director name to a more local thing X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=70cfaa97690aa58e4aed61a2f790e56b1ef0842c;p=mirror%2Fdsa-puppet.git start with moving director name to a more local thing --- diff --git a/modules/bacula/manifests/director.pp b/modules/bacula/manifests/director.pp index a1a4e94b4..bb6901dba 100644 --- a/modules/bacula/manifests/director.pp +++ b/modules/bacula/manifests/director.pp @@ -1,12 +1,13 @@ # our bacula director # -# @param pool_name A string to be used in pool names -# @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 port_dir Port that the director should listen on -# @param db_sslca SSL CA store for DB access +# @param pool_name A token to be used in pool names +# @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 port_dir Port that the director should listen on +# @param db_sslca SSL CA store for DB access +# @param director_name bacula name of this dir instance class bacula::director( String $db_address, Integer $db_port, @@ -15,6 +16,8 @@ class bacula::director( String $pool_name = 'bacula', Integer $port_dir = 9101, Optional[String] $db_sslca = undef, + #String $storage_name = "${::fqdn}-dir", + String $director_name = $bacula::bacula_director_name, ) inherits bacula { # used by e.g. bconsole diff --git a/modules/bacula/templates/bacula-dir.conf.erb b/modules/bacula/templates/bacula-dir.conf.erb index 5d512e643..03ed75b85 100644 --- a/modules/bacula/templates/bacula-dir.conf.erb +++ b/modules/bacula/templates/bacula-dir.conf.erb @@ -10,7 +10,7 @@ ######################################################################## Director { - Name = <%= @bacula_director_name %> + Name = <%= @director_name %> Description = <%= @hostname %> - <%= @domain %> Bacula Director QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/var/lib/bacula" diff --git a/modules/bacula/templates/bconsole.conf.erb b/modules/bacula/templates/bconsole.conf.erb index 8eeb3e5e8..74f970675 100644 --- a/modules/bacula/templates/bconsole.conf.erb +++ b/modules/bacula/templates/bconsole.conf.erb @@ -7,7 +7,7 @@ # Director { - Name = <%= @bacula_director_name %> + Name = <%= @director_name %> DIRport = <%= @port_dir %> address = <%= @bacula_director_address %> Password = "<%= @director_secret %>"