Merge pull request #92 from Shipssv83/fix_path

fix path and configure
This commit is contained in:
L3D 2023-02-25 20:51:41 +01:00 committed by GitHub
commit 4f1ed05096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 }}'