23 lines
596 B
YAML
23 lines
596 B
YAML
|
- name:
|
||
|
become: true
|
||
|
block:
|
||
|
- name: Create borg backup
|
||
|
command:
|
||
|
cmd: |
|
||
|
borg create
|
||
|
--compression=lzma
|
||
|
"{{ borg_repodir }}::secrets-{now:%Y-%m-%d_%H-%M-%S}"
|
||
|
{{ playbook_dir }}/../secrets.yml
|
||
|
environment:
|
||
|
BORG_PASSCOMMAND: "cat {{ borg_passphrase_file }}"
|
||
|
|
||
|
- name: Prune borg repository
|
||
|
command:
|
||
|
cmd: |
|
||
|
borg prune
|
||
|
--glob-archives='secrets-*'
|
||
|
{{ borg_prune_options }}
|
||
|
{{ borg_repodir }}
|
||
|
environment:
|
||
|
BORG_PASSCOMMAND: "cat {{ borg_passphrase_file }}"
|