diff options
| author | Colin Wilk <colin@wilk.cx> | 2026-06-22 15:15:42 +0200 |
|---|---|---|
| committer | Colin Wilk <colin@wilk.cx> | 2026-06-22 15:15:42 +0200 |
| commit | dfeca121000dfc62f4337221ff35a48a4655580e (patch) | |
| tree | 03b3fc909c7f123f372ce586fc886c474978a4ba /templates | |
| parent | 8d02cba3ed34c09b394dcca8bae8f2d36d513b2b (diff) | |
| download | ansible-role-borgbackup-dfeca121000dfc62f4337221ff35a48a4655580e.tar.gz ansible-role-borgbackup-dfeca121000dfc62f4337221ff35a48a4655580e.zip | |
Add option to configure SuccessExitStatusv1.0.5
Useful for letting systemd services not get marked as failed state when
borg throws warnings. Keeping default to only accept exit code 0 as a
successful state.
Related: PR #2 https://github.com/kliwniloc/ansible-role-borgbackup/pull/2
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/borg_backup.service.j2 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/borg_backup.service.j2 b/templates/borg_backup.service.j2 index 09cb23f..5bbd90f 100644 --- a/templates/borg_backup.service.j2 +++ b/templates/borg_backup.service.j2 @@ -7,7 +7,9 @@ Type=oneshot ExecStart={{ borg_backup_script_location }} User=root Group=root -SuccessExitStatus=1 +{% if borg_backup_service_successful_exit_status | length > 0 %} +SuccessExitStatus={{ borg_backup_service_successful_exit_status | join(' ') }} +{% endif %} [Install] WantedBy=multi-user.target |