1
0
mirror of https://github.com/krislamo/puppet-rsnapshot synced 2024-11-10 08:10:34 +00:00
puppet-rsnapshot/manifests/params.pp

148 lines
5.2 KiB
ObjectPascal
Raw Normal View History

2015-12-19 10:16:05 +00:00
# == Class: rsnapshot
#
# default params
class rsnapshot::params {
$hosts = undef
$conf_d = $::osfamily ? {
'FreeBSD' => '/usr/local/etc/rsnapshot', # the place where the host specific configs are stored
default => '/etc/rsnapshot,' # the place where the host specific configs are stored
}
2015-12-21 13:50:17 +00:00
$config_backup_user = 'root'
2015-12-19 10:16:05 +00:00
$package_name = 'rsnapshot'
$package_ensure = 'present'
2016-01-22 14:01:32 +00:00
$cron_service_name = $::osfamily ? {
'RedHat' => 'crond',
'Debian' => 'cron',
'FreeBSD' => 'cron',
default => '',
2016-01-22 14:01:32 +00:00
}
2017-04-06 07:20:32 +00:00
$manage_cron = true
2015-12-21 13:50:17 +00:00
$cron_dir = '/etc/cron.d'
$config_backup_levels = [ 'daily', 'weekly', 'monthly' ]
2015-12-19 17:32:24 +00:00
$config_backup_defaults = true
2015-12-19 10:16:05 +00:00
$config_version = '1.2'
2017-02-27 08:49:59 +00:00
$config_check_mk_job = false
2015-12-19 10:16:05 +00:00
$config_cmd_cp = '/bin/cp'
$config_cmd_rm = '/bin/rm'
$config_cmd_rsync = $::osfamily ? {
'FreeBSD' => '/usr/local/bin/rsync',
default => '/usr/bin/rsync',
}
2015-12-19 10:16:05 +00:00
$config_cmd_ssh = '/usr/bin/ssh'
$config_cmd_logger = '/usr/bin/logger'
$config_cmd_du = '/usr/bin/du'
$config_cmd_rsnapshot = $::osfamily ? {
'FreeBSD' => '/usr/local/bin/rsnapshot',
default => '/usr/bin/rsnapshot',
}
$config_cmd_rsnapshot_diff = $::osfamily ? {
'FreeBSD' => '/usr/local/bin/rsnapshot-diff',
default => '/usr/bin/rsnapshot-diff',
}
2015-12-19 10:16:05 +00:00
$config_cmd_preexec = undef
$config_cmd_postexec = undef
2017-04-02 08:40:07 +00:00
$config_cronfile_prefix = 'rsnapshot_'
$config_cronfile_prefix_use = false
2015-12-19 10:16:05 +00:00
$config_use_lvm = undef
$config_linux_lvm_cmd_lvcreate = undef # '/sbin/lvcreate'
$config_linux_lvm_cmd_lvremove = undef # '/sbin/lvremove'
$config_linux_lvm_cmd_mount = undef # '/sbin/mount'
$config_linux_lvm_cmd_umount = undef # '/sbin/umount'
$config_linux_lvm_snapshotsize = undef # '100M'
$config_linux_lvm_snapshotname = undef # 'rsnapshot'
$config_linux_lvm_vgpath = undef # '/dev'
$config_linux_lvm_mountpath = undef # '/mount/rsnapshot'
$config_logpath = '/var/log/rsnapshot'
$config_logfile = '/var/log/rsnapshot.log' # unused, we are logging to $logpath/$host.log
$config_lockpath = '/var/run/rsnapshot'
$config_snapshot_root = '/backup'
2015-12-19 10:16:05 +00:00
$config_no_create_root = undef # bool, true or false
$config_verbose = '2'
$config_loglevel = '4'
$config_stop_on_stale_lockfile = undef # bool
$config_rsync_short_args = '-az'
$config_rsync_long_args = undef # defaults are --delete --numeric-ids --relative --delete-excluded
2015-12-19 10:16:05 +00:00
$config_ssh_args = undef
$config_du_args = undef
$config_one_fs = undef
$config_retain = { }
$config_interval = {
'daily' => '7',
'weekly' => '4',
'monthly' => '6',
}
$config_include = []
$config_exclude = []
$config_include_file = undef
$config_exclude_file = undef
$config_link_dest = false
$config_sync_first = false
$config_rsync_numtries = 1
$config_use_lazy_deletes = false
$config_default_backup = {
2015-12-19 10:16:05 +00:00
'/etc' => './',
'/home' => './',
}
$config_backup_scripts = {}
$cron = {
2016-01-22 13:07:06 +00:00
mailto => 'admin@example.com',
2015-12-21 23:20:58 +00:00
hourly => {
minute => '0..59',
hour => '*', # you could also do: ['21..23','0..4','5'],
monthday => '*',
month => '*',
weekday => '*',
},
2015-12-21 23:20:58 +00:00
daily => {
minute => '0..59',
hour => '0..23', # you could also do: ['21..23','0..4','5'],
monthday => '*',
month => '*',
weekday => '*',
},
2015-12-21 23:20:58 +00:00
weekly => {
minute => '0..59',
hour => '0..23', # you could also do: ['21..23','0..4','5'],
monthday => '*',
month => '*',
weekday => '0..6',
},
2015-12-21 23:20:58 +00:00
monthly => {
minute => '0..59',
2017-03-14 22:52:08 +00:00
hour => '0..23', # you could also do: ['21..23','0..4','5'],
monthday => '1..28',
2015-12-21 23:20:58 +00:00
month => '*',
weekday => '*',
},
}
$backup_scripts = {
2016-01-22 12:17:03 +00:00
mysql => {
dbbackup_user => 'root',
2016-01-22 12:17:03 +00:00
dbbackup_password => '',
dumper => 'mysqldump',
dump_flags => '--single-transaction --quick --routines --ignore-table=mysql.event',
ignore_dbs => [ 'information_schema', 'performance_schema' ],
2016-01-22 14:01:32 +00:00
compress => 'pbzip2',
},
psql => {
dbbackup_user => 'postgres',
dbbackup_password => '',
2016-01-22 12:17:03 +00:00
dumper => 'pg_dump',
dump_flags => '-Fc',
2016-01-25 08:40:05 +00:00
ignore_dbs => [ 'postgres' ],
2016-01-22 14:01:32 +00:00
compress => 'pbzip2',
},
2016-01-22 14:01:32 +00:00
misc => {
commands => $::osfamily ? {
'RedHat' => [
'rpm -qa --qf="%{name}," > packages.txt',
],
'Debian' => [
'dpkg --get-selections > packages.txt',
],
default => [],
},
2017-04-02 07:14:46 +00:00
},
}
2015-12-19 10:16:05 +00:00
}