Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9125597
repository.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
953 B
Subscribers
None
repository.pp
View Options
# Definition of a Borg Backup repository server
define
profile
::
borg
::
repository
(
String
$encryption,
String
$passphrase,
String
$authorized_key,
String
$fqdn
=
$title,
){
include
profile
::
borg
::
repository_base
$user
=
$profile::borg::repository_base::user
$fullpath
=
"${profile::borg::repository_base::repository_path}/${fqdn}"
$borg_authorized_keys
=
$profile::borg::repository_base::authorized_keys
exec
{
"borg init --encryption=${encryption} ${fullpath}"
:
user
=>
$user,
path
=>
[
'/bin'
,
'/usr/bin'
],
creates
=>
$fullpath,
environment
=>
"BORG_PASSPHRASE=${passphrase}"
,
require
=>
Package
[
'borgbackup'
],
}
::
concat
::
fragment
{
"borg-authorized-keys-${fullpath}"
:
target
=>
$borg_authorized_keys,
order
=>
'10'
,
content
=>
"command=\"
borg
serve
--
restrict
-
to
-
path
${fullpath}\",restrict
${authorized_key}\n",
tag
=>
'borg-authorized-keys'
,
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 9:06 PM (4 w, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3241085
Attached To
rSPSITE puppet-swh-site
Event Timeline
Log In to Comment