2020-05-01 10:56:07 +02:00
|
|
|
#!/usr/bin/env bash
|
2019-09-11 11:31:51 +02:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
# Backup credentials for {{ item.src|default('stdin') }}
|
|
|
|
# Source this file to work with restic on this host
|
|
|
|
|
|
|
|
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
|
|
|
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
|
2019-12-17 14:19:25 +01:00
|
|
|
{% if restic_repos[item.repo].aws_access_key is defined %}
|
|
|
|
AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
|
|
|
|
{% endif %}
|
|
|
|
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
|
|
|
|
AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
|
|
|
|
{% endif %}
|
2019-09-11 11:31:51 +02:00
|
|
|
BACKUP_NAME={{ item.name }}
|
|
|
|
{% if item.src is defined %}
|
|
|
|
BACKUP_SOURCE={{ item.src }}
|
|
|
|
{% endif %}
|