X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fbacula%2Fmanifests%2Finit.pp;h=02cf50615db485740b8fa8c3537d89ef0cc87933;hb=51c79070603003701cef47513835b6d3e41e64fc;hp=88448fc32a1cb290f6b0c401e1b042f479b05ed2;hpb=6f31e7820de17d343bbb522e240c9a90438e21df;p=mirror%2Fdsa-puppet.git diff --git a/modules/bacula/manifests/init.pp b/modules/bacula/manifests/init.pp index 88448fc32..02cf50615 100644 --- a/modules/bacula/manifests/init.pp +++ b/modules/bacula/manifests/init.pp @@ -1 +1,45 @@ -class bacula {} +# bacula class -- defines all the variables we care about in our bacula deployment +# +# @param ssl_ca_path full path and filename specifying a PEM encoded TLS CA certificate(s) +# @param ssl_client_cert path to TLS client certificate +# @param ssl_client_key path to TLS client certificate key +# @param ssl_server_cert path to TLS server certificate +# @param ssl_server_key path to TLS server certificate key +# @param email_all email address for all reports +# @param email_error email address for errors +# @param email_operator email address for the operator (to mount tapes etc) +# @param email_daemon email address for messages from the daemon +# @param public_addresses this host's public IP addresses. The ones it connects out from and is reachable from outsite. +# @param has_ipv4 daemons should listen on ipv4 +# @param has_ipv6 daemons should listen on ipv6 +class bacula ( + String $ssl_ca_path, + String $ssl_client_cert, + String $ssl_client_key, + String $ssl_server_cert, + String $ssl_server_key, + + Optional[String] $email_all = undef, + # default to all if defined, otherwise default to 'root' to enforce error delivery + String $email_error = $email_all ? { undef => 'root', default => $email_all }, + String $email_operator = $email_error, + String $email_daemon = $email_error, + Array[Stdlib::IP::Address] $public_addresses = $base::public_addresses, + Boolean $has_ipv4 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V4 }, + Boolean $has_ipv6 = $bacula::public_addresses.any |$addr| { $addr =~ Stdlib::IP::Address::V6 }, +) { + # This file is used by our helper scripts on the director + $bacula_dsa_client_list = '/etc/bacula/dsa-clients' + $tag_bacula_dsa_client_list = 'bacula::dsa::clientlist' + + $bacula_tls_ca_certificate_file = "TLS CA Certificate File = \"${ssl_ca_path}\"" + $bacula_tls_client_certificate = "TLS Certificate = \"${ssl_client_cert}\"" + $bacula_tls_client_key = "TLS Key = \"${ssl_client_key}\"" + $bacula_tls_server_certificate = "TLS Certificate = \"${ssl_server_cert}\"" + $bacula_tls_server_key = "TLS Key = \"${ssl_server_key}\"" + + file { '/usr/local/sbin/bacula-idle-restart': + mode => '0555', + source => 'puppet:///modules/bacula/bacula-idle-restart', + } +}