Skip to content

Commit 8ddfd19

Browse files
committed
Set default values and removed duplicates
1 parent 51c435c commit 8ddfd19

File tree

1 file changed

+36
-37
lines changed

1 file changed

+36
-37
lines changed

manifests/server/config.pp

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,43 @@
11
define rsnapshot::server::config (
2-
$config_path = undef,
3-
$log_path = undef,
4-
$backup_path = undef,
5-
$backup_user = undef,
2+
3+
$config_path = $rsnapshot::params::server_config_path,
4+
$backup_path = $rsnapshot::params::server_backup_path,
5+
$log_path = $rsnapshot::params::server_log_path,
6+
$lock_path = $rsnapshot::params::lock_path,
7+
$backup_user = $rsnapshot::params::server_user,
8+
$remote_user = $rsnapshot::params::client_user,
69
$directories = {},
7-
$lock_path = undef,
810
$includes = {},
911
$excludes = {},
1012
$include_files = {},
1113
$exclude_files = {},
12-
$config_path = undef,
13-
$log_path = undef,
14-
$lock_path = undef,
15-
$remote_user = undef,
16-
$no_create_root = undef,
17-
$verbose = undef,
18-
$log_level = undef,
19-
$link_dest = undef,
20-
$sync_first = undef,
21-
$use_lazy_deletes = undef,
22-
$rsync_numtries = undef,
23-
$stop_on_stale_lockfile = undef,
24-
$user = undef,
25-
$server = undef,
26-
$backup_hourly_cron = undef,
27-
$backup_time_minute = undef,
28-
$backup_time_hour = undef,
29-
$backup_time_weekday = undef,
30-
$backup_time_dom = undef,
31-
$cmd_preexec = undef,
32-
$cmd_postexec = undef,
33-
$retain_hourly = undef,
34-
$retain_daily = undef,
35-
$retain_weekly = undef,
36-
$retain_monthly = undef,
37-
$one_fs = undef,
38-
$rsync_short_args = undef,
39-
$rsync_long_args = undef,
40-
$ssh_args = undef,
41-
$wrapper_path = undef,
42-
$du_args = undef,
43-
$use_sudo = undef,
14+
$server = $::fqdn,
15+
$no_create_root = $rsnapshot::params::no_create_root,
16+
$verbose = $rsnapshot::params::verbose,
17+
$log_level = $rsnapshot::params::log_level,
18+
$link_dest = $rsnapshot::params::link_dest,
19+
$sync_first = $rsnapshot::params::sync_first,
20+
$use_lazy_deletes = $rsnapshot::params::use_lazy_deletes,
21+
$rsync_numtries = $rsnapshot::params::rsync_numtries,
22+
$stop_on_stale_lockfile = $rsnapshot::params::stop_on_stale_lockfile,
23+
$backup_hourly_cron = $rsnapshot::params::backup_hourly_cron,
24+
$backup_time_minute = $rsnapshot::params::backup_time_minute,
25+
$backup_time_hour = $rsnapshot::params::backup_time_hour,
26+
$backup_time_weekday = $rsnapshot::params::backup_time_weekday,
27+
$backup_time_dom = $rsnapshot::params::backup_time_dom,
28+
$cmd_preexec = $rsnapshot::params::cmd_preexec,
29+
$cmd_postexec = $rsnapshot::params::cmd_postexec,
30+
$retain_hourly = $rsnapshot::params::retain_hourly,
31+
$retain_daily = $rsnapshot::params::retain_daily,
32+
$retain_weekly = $rsnapshot::params::retain_weekly,
33+
$retain_monthly = $rsnapshot::params::retain_monthly,
34+
$one_fs = $rsnapshot::params::one_fs,
35+
$rsync_short_args = $rsnapshot::params::rsync_short_args,
36+
$rsync_long_args = $rsnapshot::params::rsync_long_args,
37+
$ssh_args = $rsnapshot::params::ssh_args,
38+
$wrapper_path = $rsnapshot::params::wrapper_path,
39+
$du_args = $rsnapshot::params::du_args,
40+
$use_sudo = false,
4441
$wrapper_sudo = $rsnapshot::params::wrapper_sudo,
4542
$wrapper_rsync_sender = $rsnapshot::params::wrapper_rsync_sender,
4643
$wrapper_rsync_ssh = $rsnapshot::params::wrapper_rsync_ssh,
@@ -53,6 +50,8 @@
5350
$backup_path_norm = regsubst($backup_path, '\/$', '')
5451
$wrapper_path_norm = regsubst($wrapper_path, '\/$', '')
5552

53+
$user = $backup_user
54+
5655
$log_file = "${log_path_norm}/${name}-rsnapshot.log"
5756
$lock_file = "${lock_path_norm}/${name}-rsnapshot.pid"
5857
$config_file = "${config_path_norm}/${name}-rsnapshot.conf"

0 commit comments

Comments
 (0)