bacula: Initial version of module.

This commit is contained in:
Timo Mkinen 2013-05-10 17:20:15 +03:00
parent e7ae4fb55b
commit 4efe6bcd92
12 changed files with 651 additions and 0 deletions

View file

@ -0,0 +1,82 @@
Director {
Name = "bacula-dir"
WorkingDirectory = "/srv/bacula"
PidDirectory = "/var/run"
QueryFile = "/etc/bacula/query.sql"
Password = "<%= @password_real %>"
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
TLS Verify Peer = yes
}
Messages {
Name = "Standard"
MailCommand = "mail -s \"Bacula Message\" %r"
OperatorCommand = "mail -s \"Bacula Operator Message\" %r"
mail = root = all, !skipped
operator = root = mount
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all
}
Catalog {
Name = "Catalog"
<% if @dbadapter == "sqlite" -%>
dbname = bacula
user = "bacula"
password = ""
<% else -%>
<% if @dbserver == 'localhost' -%>
<% if @dbadapter == 'mysql' -%>
DB Socket = "/var/lib/mysql/mysql.sock"
<% end -%>
<% else -%>
DB Address = "<%= @dbserver %>"
<% end -%>
dbname = "<%= @dbname %>"
user = "<%= dbuser %>"
password = "<%= dbpassword %>"
<% end %>
}
Pool {
Name = "Default"
Pool Type = Backup
Recycle = no
}
Schedule {
Name = "Default"
Run = Level=Full on 1 at 3:00
Run = Level=Incremental on 2-31 at 3:00
}
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Messages = Standard
Schedule = Default
FileSet = Default
Pool = Default
Storage = Default
Write Bootstrap = "/srv/bacula/%c.bsr"
Priority = 10
}
Job {
Name = "RestoreJob"
Type = Restore
Client = "<%= @homename %>"
FileSet = "Default"
Storage = Default
Messages = Standard
Pool = Default
Where = "/var/tmp"
}
@|"sh -c 'find /etc/bacula/bacula-dir.d/*.conf -exec echo @{} \\;'"

View file

@ -0,0 +1,26 @@
Director {
Name = "bacula-dir"
Password = "<%= @password_real %>"
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
}
FileDaemon {
Name = "<%= @homename %>"
WorkingDirectory = /var/spool/bacula
Pid Directory = /var/run
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
}
Messages {
Name = "Standard"
director = bacula-dir = all, !skipped, !restored
}

View file

@ -0,0 +1,34 @@
Storage {
Name = "<%= @homename %>"
WorkingDirectory = "/var/spool/bacula"
Pid Directory = "/var/run"
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
TLS Verify Peer = yes
}
Director {
Name = "bacula-dir"
Password = "<%= @password_real %>"
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
TLS Verify Peer = yes
}
Messages {
Name = "Standard"
MailCommand = "mail -s \"Bacula Message\" %r"
OperatorCommand = "mail -s \"Bacula Operator Message\" %r"
mail = root = all, !skipped, !info
operator = root = mount
director = bacula-dir = all
}
@|"sh -c 'find /etc/bacula/bacula-sd.d/*.conf -exec echo @{} \\;'"

View file

@ -0,0 +1,11 @@
Director {
Name = "bacula-dir"
Address = "vm23.home.foo.sh"
Password = "<%= @password_real %>"
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
}

View file

@ -0,0 +1,12 @@
Client {
Name = "<%= @homename %>"
Address = <%= @homename %>
Catalog = "Catalog"
Password = "<%= @password_real %>"
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
}

View file

@ -0,0 +1,10 @@
Device {
Name = "<%= @name %>"
Media Type = <%= @media %>
Archive Device = <%= @device %>
AutomaticMount = yes;
AlwaysOpen = no;
RemovableMedia = yes;
RandomAccess = no;
}

View file

@ -0,0 +1,8 @@
Job {
Name = "<%= @name %>"
Client = "<%= @homename %>"
JobDefs = "<%= @jobdefs %>"
<% @options.each do |val| -%>
<%= val %>
<% end -%>
}

View file

@ -0,0 +1,14 @@
Storage {
Name = "<%= @name %>"
Address = <%= @homename %>
Password = "<%= scope.lookupvar('bacula::storage::password_real') %>"
Device = "<%= @name %>"
Media Type = <%= @media %>
TLS Enable = yes
TLS Require = yes
TLS Key = /etc/pki/tls/private/bacula.key
TLS Certificate = /etc/pki/tls/certs/bacula.crt
TLS CA Certificate File = <%= @puppet_ssldir %>/certs/ca.pem
}