Fix pre-commit hooks and move directories
roles/ and inventory/ are now in playbooks/ also fixed issues reported by ansible-lint
This commit is contained in:
parent
dc398ddb6e
commit
4104057771
123 changed files with 91 additions and 39 deletions
playbooks/roles/backup/templates
11
playbooks/roles/backup/templates/backup.service.j2
Normal file
11
playbooks/roles/backup/templates/backup.service.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=Run the backup script
|
||||
StartLimitIntervalSec=7200
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart={{ (service_path, 'backup.sh') | path_join }}
|
||||
WorkingDirectory={{ service_path }}
|
||||
Restart=on-failure
|
||||
RestartSec=15min
|
12
playbooks/roles/backup/templates/backup.sh.j2
Normal file
12
playbooks/roles/backup/templates/backup.sh.j2
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
{{ backup_hc_command_start }}
|
||||
|
||||
if autorestic backup -av --ci
|
||||
then
|
||||
{{ backup_hc_command_success }}
|
||||
{{ backup_gatus_command_success }}
|
||||
else
|
||||
{{ backup_hc_command_fail }}
|
||||
{{ backup_gatus_command_fail }}
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue