From 145f424846c30b2c4768c6d24e2f8da4467f43be Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 13:56:37 +0200 Subject: [PATCH 1/7] Update configure.yml --- tasks/configure.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/configure.yml b/tasks/configure.yml index 1b67585..22dac5d 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -4,6 +4,8 @@ environment: RESTIC_REPOSITORY: '{{ item.value.location }}' RESTIC_PASSWORD: '{{ item.value.password }}' + AWS_ACCESS_KEY_ID: '{{ item.value.aws_access_key | default(omit) }}' + AWS_SECRET_ACCESS_KEY: '{{ item.value.aws_secret_access_key | default(omit) }}' no_log: true register: restic_init changed_when: "'created restic repository' in restic_init.stdout" From 61f75e16264fc9dfc3e5e57a439c6a975ff58138 Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 13:58:43 +0200 Subject: [PATCH 2/7] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 412cd18..0dd9aed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ 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 + ## [0.2.4] - 2020-06-01 ### Added * `aws_default_region` for repos From 05b1758e8245cc13fde241efcf81f851276d9699 Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 14:00:05 +0200 Subject: [PATCH 3/7] Update configure.yml --- tasks/configure.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/configure.yml b/tasks/configure.yml index 22dac5d..a965b7d 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -6,6 +6,7 @@ RESTIC_PASSWORD: '{{ item.value.password }}' AWS_ACCESS_KEY_ID: '{{ item.value.aws_access_key | default(omit) }}' AWS_SECRET_ACCESS_KEY: '{{ item.value.aws_secret_access_key | default(omit) }}' + AWS_DEFAULT_REGION: '{{ item.value.aws_default_region | default(omit) }}' no_log: true register: restic_init changed_when: "'created restic repository' in restic_init.stdout" From 9260b88a97fd92dbb84d5287b597cb6259163ba9 Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 14:09:43 +0200 Subject: [PATCH 4/7] Update Linux.yml --- tasks/distribution/Linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }}' From b44b1694de4309fdaccca65218da79b05f252e9c Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 14:10:40 +0200 Subject: [PATCH 5/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dd9aed..6500db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ 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 ## [0.2.4] - 2020-06-01 ### Added From f500327f594ac9f504e90841a5a12dfd68fb3baf Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 15:58:43 +0200 Subject: [PATCH 6/7] FIX: init --- CHANGELOG.md | 1 + tasks/configure.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6500db9..465974f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and [human-readable changelog](https://keepachangelog.com/en/1.0.0/). ### 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 diff --git a/tasks/configure.yml b/tasks/configure.yml index a965b7d..642f2de 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -13,6 +13,7 @@ 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 From 8a0a4d91c4105ce32c49f9a1cbb78c8d9053173f Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Tue, 2 Jun 2020 19:45:52 +0200 Subject: [PATCH 7/7] FIX: region --- tasks/configure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 642f2de..6a82de7 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -4,9 +4,9 @@ environment: RESTIC_REPOSITORY: '{{ item.value.location }}' RESTIC_PASSWORD: '{{ item.value.password }}' - AWS_ACCESS_KEY_ID: '{{ item.value.aws_access_key | default(omit) }}' - AWS_SECRET_ACCESS_KEY: '{{ item.value.aws_secret_access_key | default(omit) }}' - AWS_DEFAULT_REGION: '{{ item.value.aws_default_region | default(omit) }}' + 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"