From: Tollef Fog Heen Date: Sat, 16 Jun 2012 10:44:56 +0000 (+0200) Subject: Add initial client configuration X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=8380600352d3abf2b2641d322ad1c4800f0edcf0;p=mirror%2Fdsa-puppet.git Add initial client configuration --- diff --git a/modules/bacula/manifests/client.pp b/modules/bacula/manifests/client.pp new file mode 100644 index 000000000..4ab2b5930 --- /dev/null +++ b/modules/bacula/manifests/client.pp @@ -0,0 +1,32 @@ +class bacula::client inherits bacula { + + package { + "bacula-client": ensure => installed; + "bacula-fd": ensure => installed; + } + + service { + "bacula-fd": + ensure => running, + enable => true, + hasstatus => true, + require => Package["bacula-fd"]; + } + + file { + "/etc/bacula/bacula-fd.conf": + content => template("bacula/bacula-fd.conf.erb"), + mode => 640, + owner => root, + group => bacula, + require => Package["bacula-fd"], + notify => Exec["bacula-fd restart"] + ; + } + + exec { + "bacula-fd restart": + path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", + refreshonly => true; + } +} diff --git a/modules/bacula/templates/bacula-fd.conf.erb b/modules/bacula/templates/bacula-fd.conf.erb new file mode 100644 index 000000000..b222569e2 --- /dev/null +++ b/modules/bacula/templates/bacula-fd.conf.erb @@ -0,0 +1,28 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## +# For Bacula release 5.0.1 (24 February 2010) -- debian 5.0.4 + +# List Directors who are permitted to contact this File daemon +Director { + Name = <%= bacula_director_name %> + Password = "<%= bacula_client_secret %>" +} + +# "Global" File daemon configuration specifications +FileDaemon { + Name = <%= bacula_client_name %> + FDport = <%= bacula_client_port %> + WorkingDirectory = /var/lib/bacula + Pid Directory = /var/run/bacula + Maximum Concurrent Jobs = 20 + FDAddress = <%= fqdn %> + Maximum Network Buffer Size = 65536 +} + +# Send all messages except skipped files back to Director +Messages { + Name = Standard + director = <%=bacula_director_name%> = all, !skipped, !restored +}