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
|
# File 'manifests/service.pp', line 2
class borg::service {
assert_private()
# there isn't any real service
# borg runs via a systemd timer
# You don't have systemd? GO AWAY!
if $facts['systemd'] {
systemd::unit_file { 'borg-backup.service':
content => epp("${module_name}/borg-backup.service.epp", {
'create_prometheus_metrics' => $borg::create_prometheus_metrics,
'restore_script_path' => $borg::restore_script_path,
'use_upstream_reporter' => $borg::use_upstream_reporter,
'update_borg_restore_db_after_backuprun' => $borg::update_borg_restore_db_after_backuprun,
'after' => $borg::after,
'wants' => $borg::wants,
'requires' => $borg::requires,
}
),
}
-> systemd::unit_file { 'borg-backup.timer':
content => epp("${module_name}/borg-backup.timer.epp",
backuptime => $borg::backuptime
),
enable => true,
active => true,
}
}
}
|