mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-12-13 13:20:18 +01:00
Merge pull request #9 from alt4/aws-region
Add AWS_DEFAULT_REGION variable and export S3 vars in scripts
This commit is contained in:
commit
3a75c1c793
3 changed files with 11 additions and 4 deletions
|
@ -92,6 +92,7 @@ Available variables:
|
||||||
| `init` | no | Describes if the repository should be initialized or not. Use `false` if you are backuping to an already existing repo. |
|
| `init` | no | Describes if the repository should be initialized or not. Use `false` if you are backuping to an already existing repo. |
|
||||||
| `aws_access_key` | no | The access key for the S3 backend |
|
| `aws_access_key` | no | The access key for the S3 backend |
|
||||||
| `aws_secret_access_key` | no | The secret access key for the S3 backend |
|
| `aws_secret_access_key` | no | The secret access key for the S3 backend |
|
||||||
|
| `aws_default_region` | no | The desired region for the S3 backend |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
@ -6,10 +6,13 @@
|
||||||
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
||||||
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
|
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
|
||||||
{% if restic_repos[item.repo].aws_access_key is defined %}
|
{% if restic_repos[item.repo].aws_access_key is defined %}
|
||||||
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 %}
|
||||||
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
|
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
|
||||||
AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
|
export AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
|
||||||
|
{% endif %}
|
||||||
|
{% if restic_repos[item.repo].aws_default_region is defined %}
|
||||||
|
export AWS_DEFAULT_REGION={{ restic_repos[item.repo].aws_default_region }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
BACKUP_NAME={{ item.name }}
|
BACKUP_NAME={{ item.name }}
|
||||||
{% if item.src is defined %}
|
{% if item.src is defined %}
|
||||||
|
|
|
@ -7,10 +7,13 @@ export RESTIC_REPOSITORY={{ restic_repos[item.repo].location }}
|
||||||
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
|
export RESTIC_PASSWORD={{ restic_repos[item.repo].password }}
|
||||||
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 %}
|
||||||
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 %}
|
||||||
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
|
{% if restic_repos[item.repo].aws_secret_access_key is defined %}
|
||||||
AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
|
export AWS_SECRET_ACCESS_KEY={{ restic_repos[item.repo].aws_secret_access_key }}
|
||||||
|
{% endif %}
|
||||||
|
{% if restic_repos[item.repo].aws_default_region is defined %}
|
||||||
|
export AWS_DEFAULT_REGION={{ restic_repos[item.repo].aws_default_region }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.src is defined %}
|
{% if item.src is defined %}
|
||||||
BACKUP_SOURCE={{ item.src }}
|
BACKUP_SOURCE={{ item.src }}
|
||||||
|
|
Loading…
Reference in a new issue