From 46b8f2171d4e34abe54fac449a53e9733ff7691b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 8 Oct 2018 22:48:50 +0200 Subject: [PATCH] Breaking: Port to new release format Makes the version incompatible with previous releases. The minimal version to be deployed using this is v0.9.0 Signed-off-by: Knut Ahlers --- defaults/main.yml | 2 +- tasks/main.yml | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index fcb8294..d30e294 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -duplicity_backup_version: v0.8.2 +duplicity_backup_version: v0.9.0 ... diff --git a/tasks/main.yml b/tasks/main.yml index 632dd1a..b06b58f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,12 +24,16 @@ register: duplicity_backup_version_cmd - name: Install duplicity-backup wrapper - get_url: - url: https://github.com/Luzifer/duplicity-backup/releases/download/v0.8.2/duplicity-backup_linux_amd64 - dest: /usr/local/bin/duplicity-backup - force: yes - mode: 0755 + unarchive: + remote_src: true + src: "https://github.com/Luzifer/duplicity-backup/releases/download/{{ duplicity_backup_version }}/duplicity-backup_linux_amd64.tar.gz" + dest: /usr/local/bin when: duplicity_backup_version not in duplicity_backup_version_cmd.stdout + register: duplicity_backup_unarchive + +- name: Move new duplicity-backup version in place + command: mv /usr/local/bin/duplicity-backup_linux_amd64 /usr/local/bin/duplicity-backup + when: duplicity_backup_unarchive.changed - name: Deploy duplicity-s3 configuration template: