diff --git a/README.md b/README.md index ae77c7c..11a185f 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,16 @@ The following lists all the class parameters the bacula class accepts as well as use_console bacula_use_console Whether to configure a console resource on the director console_password bacula_console_password The password to use for the console resource on the director +Additionally the following (uncommon) parameters can be passed to the bacula::client class: + + client_conf - File name of bacula-fd configuration file + client_conf_template - Template for bacula-fd configuration file + client_service - The name of bacula-fd service + package_provider - Package provider (for solaris only) + pid_dir - The bacula-fd pid dir + working_dir - The bacula-fd working dir + + CLIENTS ======= @@ -271,6 +281,26 @@ stored the custom template. [Using Puppet Templates](http://docs.puppetlabs.com/guides/templating.html) +SOLARIS SUPPORT +=============== + +Currently this module only configures the Bacula client on Solaris. Bacula Directors and Storage Daemon are not supported yet. + +To use bacula::client with the Solaris CSWbaculaclient package set the following class paramenters: + +```puppet + class { 'bacula::client': + director_server => 'bacula.domain.com', + director_password => 'xxxxxxx', + client_package => 'CSWbaculaclient', + package_provider => "pkgutil", + client_conf => "/opt/csw/etc/bacula/bacula-fd.conf", + client_service => "cswbacula", + working_dir => "/opt/csw/var/bacula/working", + pid_dir => "/opt/csw/var/bacula/run" + } +``` + TODO ==== diff --git a/manifests/client.pp b/manifests/client.pp index 84d4efa..8ed9bc3 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -9,6 +9,18 @@ # The director's password # $client_package: # The name of the package to install the bacula-fd service. +# $client_conf: +# File name of bacula-fd configuration file +# $client_conf_template: +# Template for bacula-fd configuration file +# $client_service: +# The name of bacula-fd service +# $package_provider: +# Package provider (for solaris only) +# $pid_dir: +# The bacula-fd pid dir +# $working_dir: +# The bacula-fd working dir # # Actions: # - Enforce the $client_package package be installed @@ -23,9 +35,15 @@ # client_package => 'bacula-client', # } class bacula::client( - $director_server, + $client_conf = "/etc/bacula/bacula-fd.conf", + $client_conf_template = "bacula/bacula-fd.conf.erb", + $client_package = "bacula-client", + $client_service = "bacula-fd", $director_password, - $client_package + $director_server, + $package_provider = undef, + $pid_dir = "/var/run/bacula", + $working_dir = "/var/lib/bacula" ) { $director_name_array = split($director_server, '[.]') @@ -33,16 +51,17 @@ package { $client_package: ensure => installed, + provider => $package_provider } - file { '/etc/bacula/bacula-fd.conf': + file { $client_conf: ensure => file, - content => template('bacula/bacula-fd.conf.erb'), - notify => Service['bacula-fd'], + content => template($client_conf_template), + notify => Service[$client_service], require => Package[$client_package], } - service { 'bacula-fd': + service { $client_service: ensure => running, enable => true, require => Package[$client_package], diff --git a/templates/bacula-fd.conf.erb b/templates/bacula-fd.conf.erb index ae62a36..a51ce7f 100644 --- a/templates/bacula-fd.conf.erb +++ b/templates/bacula-fd.conf.erb @@ -13,8 +13,8 @@ Director { # Now configure the actual File Daemon FileDaemon { Name = "<%= hostname.split('.').first -%>" - Working Directory = /var/lib/bacula - PID Directory = /var/run/bacula + Working Directory = <%= working_dir %> + PID Directory = <%= pid_dir %> Maximum Concurrent Jobs = 3 }