diff --git a/tasks/install.yml b/tasks/install.yml index b0bacc4..b53df19 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,12 +1,6 @@ --- - name: Set restic_url set_fact: - restic_url_r: 'https://github.com/restic/restic/releases/download/' - arch: ansible_architecture - 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: '{{ restic_url_r }}{{ restic_url_v }}{{ restic_file }}' when: restic_url is not defined diff --git a/vars/defaults.yml b/vars/defaults.yml index 793a516..318f949 100644 --- a/vars/defaults.yml +++ b/vars/defaults.yml @@ -11,3 +11,10 @@ restic_create_paths: - '{{ restic_install_path }}/bin' restic_bin_bath: '{{ restic_download_path }}/bin/restic-{{ restic_version }}' + +restic_url_r: 'https://github.com/restic/restic/releases/download/' +arch: '{{ ansible_architecture }}' +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'