diff --git a/CHANGELOG.md b/CHANGELOG.md index 412cd18..465974f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm and [human-readable changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased +### Fixed: +* AWS credentials are now supplied to the initialising step +* Cronjob step does not fail if `scheduled` parameter is not set on repo +* init respects `'config already initialized'` string + ## [0.2.4] - 2020-06-01 ### Added * `aws_default_region` for repos diff --git a/tasks/configure.yml b/tasks/configure.yml index 1b67585..6a82de7 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -4,12 +4,16 @@ environment: RESTIC_REPOSITORY: '{{ item.value.location }}' RESTIC_PASSWORD: '{{ item.value.password }}' + AWS_ACCESS_KEY_ID: '{{ item.value.aws_access_key | default("") }}' + AWS_SECRET_ACCESS_KEY: '{{ item.value.aws_secret_access_key | default("") }}' + AWS_DEFAULT_REGION: '{{ item.value.aws_default_region | default("") }}' no_log: true register: restic_init changed_when: "'created restic repository' in restic_init.stdout" failed_when: - restic_init.rc != 0 - not 'config file already exists' in restic_init.stderr + - not 'config already initialized' in restic_init.stderr loop: "{{ restic_repos|dict2items }}" when: - item.value.init is defined diff --git a/tasks/distribution/Linux.yml b/tasks/distribution/Linux.yml index fa6f5a3..3356f0f 100644 --- a/tasks/distribution/Linux.yml +++ b/tasks/distribution/Linux.yml @@ -45,5 +45,5 @@ when: - restic_create_cron - item.name is defined - - item.scheduled + - item.scheduled | default(false) with_items: '{{ restic_backups }}'