Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
borgbackup_client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSI Ansible
borgbackup_client
Commits
5a41bf58
Verified
Commit
5a41bf58
authored
5 years ago
by
David Mehren
Browse files
Options
Downloads
Patches
Plain Diff
Add workarounds for embedded devices and non-global settings
parent
3502616a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/onserver.yml
+25
-3
25 additions, 3 deletions
tasks/onserver.yml
with
25 additions
and
3 deletions
tasks/onserver.yml
+
25
−
3
View file @
5a41bf58
...
...
@@ -2,11 +2,33 @@
-
name
:
Create Group
group
:
name
:
"
borgbackup"
ignore_errors
:
yes
register
:
create_group
-
name
:
Create Group Fallback
command
:
addgroup borgbackup
register
:
create_group_fallback
failed_when
:
-
create_group_fallback.rc !=
0
-
"
'in
use'
not
in
create_group_fallback.stderr"
changed_when
:
create_group_fallback.rc ==
0
when
:
create_group.failed
-
name
:
Create User
user
:
name
:
"
borgbackup"
group
:
"
borgbackup"
ignore_errors
:
yes
register
:
create_user
-
name
:
Create User Fallback
command
:
adduser -D -G borgbackup borgbackup
register
:
create_user_fallback
failed_when
:
-
create_user_fallback.rc !=
0
-
"
'in
use'
not
in
create_user_fallback.stderr"
changed_when
:
create_user_fallback.rc ==
0
when
:
create_user.failed
-
name
:
Set permissions
file
:
...
...
@@ -16,11 +38,11 @@
mode
:
0700
state
:
directory
with_items
:
-
"
{{
borgbackup_pool
}}"
-
"
{{
borgbackup_pool
}}/{{
borgbackup_source_host
}}"
-
"
{{
hostvars[borgbackup_target_host]['
borgbackup_pool
']
}}"
-
"
{{
hostvars[borgbackup_target_host]['
borgbackup_pool
']
}}/{{
borgbackup_source_host
}}"
-
name
:
Add public key
authorized_key
:
user
:
"
borgbackup"
key
:
"
{{borgbackup_source_key}}"
key_options
:
"
command=
\"
cd
{{
borgbackup_pool
}}/{{
borgbackup_source_host
}};borg
serve
--restrict-to-path
{{
borgbackup_pool
}}/{{
borgbackup_source_host
}}
\"
,restrict"
key_options
:
"
command=
\"
cd
{{
hostvars[borgbackup_target_host]['
borgbackup_pool
']
}}/{{
borgbackup_source_host
}};borg
serve
--restrict-to-path
{{
hostvars[borgbackup_target_host]['
borgbackup_pool
']
}}/{{
borgbackup_source_host
}}
\"
,restrict"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment