fix path and configure

This commit is contained in:
Sergey Shipilov 2023-02-25 20:29:44 +01:00
parent 9cfe610337
commit af1f6dcc35
3 changed files with 5 additions and 8 deletions

View file

@ -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("") }}'

View file

@ -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"

View file

@ -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 }}'