1
0
Fork 0
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:
Matthias Leutenegger 2020-06-03 08:52:02 +02:00
parent 9dd9b65327
commit 60b29a64a7
2 changed files with 2 additions and 2 deletions

View file

@ -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 %}

View file

@ -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 }}