39 lines
791 B
YAML
39 lines
791 B
YAML
# Molecule managed
|
|
|
|
---
|
|
file:
|
|
/var/log/borg-backup.log:
|
|
exists: true
|
|
owner: root
|
|
group: root
|
|
contains:
|
|
- "Backup succeeded"
|
|
/root/.borg.passphrase:
|
|
exists: true
|
|
owner: root
|
|
group: root
|
|
contains:
|
|
- 'export BORG_PASSPHRASE="{{ borgbackup_passphrase }}"'
|
|
/root/.ssh/config:
|
|
exists: true
|
|
owner: root
|
|
group: root
|
|
contains:
|
|
{% for item in borgbackup_servers %}
|
|
- 'ANSIBLE MANAGED BLOCK {{ item.fqdn }}'
|
|
{% endfor %}
|
|
/usr/local/bin/borg-backup:
|
|
exists: true
|
|
owner: root
|
|
group: root
|
|
mode: "0744"
|
|
|
|
command:
|
|
bash /usr/local/bin/borg-backup list:
|
|
exit-status: 0
|
|
stdout:
|
|
{% for item in borgbackup_servers %}
|
|
- "Archives on {{ item.fqdn }}"
|
|
{% endfor %}
|
|
- "/[[:digit:]]{8}-[[:digit:]]{4}.*/"
|