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 (
$keyowner = 0,
$keygroup = 0,
$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
......@@ -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) %>
reportemail = <%= reportemail %>
reportsuccess = <%= reportsuccess ? 'yes' : 'no' %>
reportwarning = <%= reportwarning ? 'yes' : 'no' %>
<% if reporthost.is_a? String -%>
<%= 'reporthost = ' + reporthost %>
<% if @reporthost -%>
<%= 'reporthost = ' + @reporthost %>
<% end -%>
<% if reportuser.is_a? String -%>
<%= 'reportuser = ' + reportuser %>
<% if @reportuser -%>
<%= 'reportuser = ' + @reportuser %>
<% end -%>
<% if reportdirectory.is_a? String -%>
<%= 'reportdirectory = ' + reportdirectory %>
<% if @reportdirectory -%>
<%= 'reportdirectory = ' + @reportdirectory %>
<% end -%>
logfile = <%= logfile %>
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