mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2024-11-09 21:33:31 +01:00
commit
4f1ed05096
3 changed files with 5 additions and 8 deletions
|
@ -5,10 +5,7 @@
|
|||
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_SECRET_ACCESS_KEY: '{{ item.value.aws_secret_access_key | default("") }}'
|
||||
AWS_DEFAULT_REGION: '{{ item.value.aws_default_region | default("") }}'
|
||||
B2_ACCOUNT_ID: '{{ item.value.b2_account_id | default("") }}'
|
||||
B2_ACCOUNT_KEY: '{{ item.value.b2_account_key | default("") }}'
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
# TODO: This needs to become independent of the shell module to actually work
|
||||
- name: (INSTALL) Decompress the binary
|
||||
ansible.builtin.shell: "bzip2 -dc {{ get_url_restic.dest }} > {{ restic_bin_bath }}"
|
||||
ansible.builtin.shell: "bzip2 -dc {{ get_url_restic.dest }} > {{ restic_bin_path }}"
|
||||
args:
|
||||
creates: '{{ restic_download_path }}/bin/restic-{{ restic_version }}'
|
||||
|
||||
|
@ -24,14 +24,14 @@
|
|||
group: '{{ restic_dir_group }}'
|
||||
|
||||
- name: (INSTALL) Test the binary
|
||||
ansible.builtin.command: "{{ restic_bin_bath }} version"
|
||||
ansible.builtin.command: "{{ restic_bin_path }} version"
|
||||
ignore_errors: true
|
||||
register: restic_test_result
|
||||
changed_when: false
|
||||
|
||||
- name: (INSTALL) Remove faulty binary
|
||||
ansible.builtin.file:
|
||||
path: '{{ restic_bin_bath }}'
|
||||
path: '{{ restic_bin_path }}'
|
||||
state: absent
|
||||
when: "'FAILED' in restic_test_result.stderr"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ restic_create_paths:
|
|||
- '{{ restic_script_dir }}'
|
||||
- '{{ restic_log_dir }}'
|
||||
|
||||
restic_bin_bath: '{{ restic_download_path }}/bin/restic-{{ restic_version }}'
|
||||
restic_bin_path: '{{ restic_download_path }}/bin/restic-{{ restic_version }}'
|
||||
|
||||
restic_url_r: 'https://github.com/restic/restic/releases/download/'
|
||||
arch: '{{ ansible_architecture }}'
|
||||
|
|
Loading…
Reference in a new issue