Commit 8d973656 authored by Jerome Charaoui's avatar Jerome Charaoui

Merge backupninja:config class into base client class

parent d18c3e03
...@@ -13,6 +13,21 @@ class backupninja ( ...@@ -13,6 +13,21 @@ class backupninja (
$keyowner = 0, $keyowner = 0,
$keygroup = 0, $keygroup = 0,
$keymanage = true, $keymanage = true,
$configfile = '/etc/backupninja.conf',
$loglvl = 4,
$when = 'everyday at 01:00',
$reportemail = 'root',
$reportsuccess = false,
$reportwarning = true,
$reporthost = undef,
$reportuser = undef,
$reportdirectory = undef,
$logfile = '/var/log/backupninja.log',
$configdir = '/etc/backup.d',
$scriptdir = '/usr/share/backupninja',
$libdir = '/usr/lib/backupninja',
$usecolors = true,
$vservers = false
) { ) {
# install client dependencies # install client dependencies
...@@ -65,4 +80,11 @@ class backupninja ( ...@@ -65,4 +80,11 @@ class backupninja (
} }
} }
file { $configfile:
content => template('backupninja/backupninja.conf.erb'),
owner => root,
group => 0,
mode => '0644'
}
} }
...@@ -8,14 +8,14 @@ when = <%= send(:when) %> ...@@ -8,14 +8,14 @@ when = <%= send(:when) %>
reportemail = <%= reportemail %> reportemail = <%= reportemail %>
reportsuccess = <%= reportsuccess ? 'yes' : 'no' %> reportsuccess = <%= reportsuccess ? 'yes' : 'no' %>
reportwarning = <%= reportwarning ? 'yes' : 'no' %> reportwarning = <%= reportwarning ? 'yes' : 'no' %>
<% if reporthost.is_a? String -%> <% if @reporthost -%>
<%= 'reporthost = ' + reporthost %> <%= 'reporthost = ' + @reporthost %>
<% end -%> <% end -%>
<% if reportuser.is_a? String -%> <% if @reportuser -%>
<%= 'reportuser = ' + reportuser %> <%= 'reportuser = ' + @reportuser %>
<% end -%> <% end -%>
<% if reportdirectory.is_a? String -%> <% if @reportdirectory -%>
<%= 'reportdirectory = ' + reportdirectory %> <%= 'reportdirectory = ' + @reportdirectory %>
<% end -%> <% end -%>
logfile = <%= logfile %> logfile = <%= logfile %>
configdirectory = <%= configdir %> configdirectory = <%= configdir %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment