-
Notifications
You must be signed in to change notification settings - Fork 2
/
params.pp
93 lines (84 loc) · 2.9 KB
/
params.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File:: <tt>backupninja-params.pp</tt>
# Author:: Hyacinthe Cartiaux ([email protected])
# Copyright:: Copyright (c) 2012 Hyacinthe Cartiaux
# License:: GPLv3
#
# ------------------------------------------------------------------------------
# = Class: backupninja::params
#
# In this class are defined as variables values that are used in other
# backupninja classes.
# This class should be included, where necessary, and eventually be enhanced
# with support for more OS
#
# == Warnings
#
# /!\ Always respect the style guide available
# here[http://docs.puppetlabs.com/guides/style_guide]
#
# The usage of a dedicated param classe is advised to better deal with
# parametrized classes, see
# http://docs.puppetlabs.com/guides/parameterized_classes.html
#
# [Remember: No empty lines between comments and class definition]
#
class backupninja::params {
######## DEFAULTS FOR VARIABLES USERS CAN SET ##########################
# (Here are set the defaults, provide your custom variables externally)
# (The default used is in the line with '')
###########################################
# ensure the presence (or absence) of backupninja
$ensure = 'present'
$loglevel = '4'
$reportemail = 'root'
$reportsuccess = 'no'
$reportinfo = 'no'
$reportwarning = 'yes'
$reportspace = 'yes'
$reporthost = ''
$reportuser = 'ninja'
$reportdirectory = '/var/lib/backupninja/reports'
$admingroup = 'root'
$logfile = '/var/log/backupninja.log'
$configdirectory = '/etc/backup.d'
$scriptdirectory = '/usr/share/backupninja'
$usecolors = 'yes'
$when = 'everyday at 01:00'
$vservers = 'no'
$libdirectory = $::facts['os']['name'] ? {
/(?i-mx:centos|fedora|redhat|rocky)/ => '/usr/libexec/backupninja',
/(?i-mx:debian|ubuntu)/ => '/usr/lib/backupninja',
default => '/usr/lib/backupninja'
}
#### MODULE INTERNAL VARIABLES #########
# (Modify to adapt to unsupported OSes)
#######################################
# backupninja packages
$packagename = $::facts['os']['name'] ? {
default => 'backupninja',
}
$configfile = $::facts['os']['name'] ? {
default => '/etc/backupninja.conf',
}
$configfile_mode = $::facts['os']['name'] ? {
default => '0644',
}
$taskfile_mode = $::facts['os']['name'] ? {
default => '0600',
}
$netbackup_mode = $::facts['os']['name'] ? {
default => '0755',
}
$configfile_owner = $::facts['os']['name'] ? {
default => 'root',
}
$configfile_group = $::facts['os']['name'] ? {
default => 'root',
}
$backupdir = $::facts['os']['name'] ? {
default => '/var/backups',
}
$backupdir_mode = $::facts['os']['name'] ? {
default => '0755',
}
}