From 24bfc275d0182be77b8633f15aeeb8ab2fd68539 Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Sat, 17 Aug 2019 09:25:37 +0200 Subject: [PATCH] add `restic_url` to defaults --- defaults/main.yml | 1 + tasks/install.yml | 5 ----- vars/defaults.yml | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index d38f20f..43f9474 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ --- # defaults file for skeleton +restic_url: '{{ restic_url_default }}' restic_version: '0.9.5' restic_download_path: '/opt/restic' restic_install_path: '/usr/bin' diff --git a/tasks/install.yml b/tasks/install.yml index b53df19..1cc7e35 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,9 +1,4 @@ --- -- name: Set restic_url - set_fact: - restic_url: '{{ restic_url_r }}{{ restic_url_v }}{{ restic_file }}' - when: restic_url is not defined - - name: Download client binary get_url: url: '{{ restic_url }}' diff --git a/vars/defaults.yml b/vars/defaults.yml index 318f949..ee5f166 100644 --- a/vars/defaults.yml +++ b/vars/defaults.yml @@ -18,3 +18,4 @@ restic_platform: '{{ _platform_map[arch] | default(arch) }}' restic_system: '{{ ansible_system | lower }}' restic_url_v: 'v{{ restic_version }}/restic_{{ restic_version }}_' restic_file: '{{ restic_system }}_{{ restic_platform }}.bz2' +restic_url_default: '{{ restic_url_r }}{{ restic_url_v }}{{ restic_file }}' \ No newline at end of file