mirror of
https://github.com/roles-ansible/ansible_role_restic.git
synced 2024-12-11 23:41:32 +01:00
CHANGE: use solution proposed by @alt4
This commit is contained in:
parent
9dd9b65327
commit
60b29a64a7
2 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
# Source this file to work with restic on this host
|
# Source this file to work with restic on this host
|
||||||
|
|
||||||
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
||||||
export RESTIC_PASSWORD="{{ restic_repos[item.repo].password | regex_escape() }}"
|
export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'', '\'\\\'\'') }}'
|
||||||
{% if restic_repos[item.repo].aws_access_key is defined %}
|
{% if restic_repos[item.repo].aws_access_key is defined %}
|
||||||
export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
|
export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# Use this file to create a Backup and prune existing data with one execution.
|
# Use this file to create a Backup and prune existing data with one execution.
|
||||||
|
|
||||||
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
||||||
export RESTIC_PASSWORD="{{ restic_repos[item.repo].password | regex_escape() }}"
|
export RESTIC_PASSWORD='{{ restic_repos[item.repo].password | regex_replace('\'', '\'\\\'\'') }}'
|
||||||
BACKUP_NAME={{ item.name }}
|
BACKUP_NAME={{ item.name }}
|
||||||
{% if restic_repos[item.repo].aws_access_key is defined %}
|
{% if restic_repos[item.repo].aws_access_key is defined %}
|
||||||
export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
|
export AWS_ACCESS_KEY_ID={{ restic_repos[item.repo].aws_access_key }}
|
||||||
|
|
Loading…
Reference in a new issue