2021-04-29 13:48:02 +02:00
|
|
|
---
|
2022-01-10 14:19:53 +01:00
|
|
|
- name: (PREPARE) Ensure restic directories exist
|
2022-01-07 20:13:57 +01:00
|
|
|
become: true
|
2021-04-29 13:48:02 +02:00
|
|
|
ansible.builtin.file:
|
|
|
|
state: 'directory'
|
|
|
|
path: '{{ item }}'
|
|
|
|
mode: '0755'
|
|
|
|
owner: '{{ restic_dir_owner }}'
|
|
|
|
group: '{{ restic_dir_group }}'
|
|
|
|
with_items: '{{ restic_create_paths }}'
|
|
|
|
|
2022-01-10 14:19:53 +01:00
|
|
|
- name: (PREPARE) Check if downloaded binary is present
|
2021-04-29 13:48:02 +02:00
|
|
|
ansible.builtin.stat:
|
|
|
|
path: '{{ restic_download_path }}/bin/restic-{{ restic_version }}'
|
|
|
|
register: restic_executable
|
|
|
|
|
2022-01-10 14:19:53 +01:00
|
|
|
- name: (PREPARE) Check if installed binary is present
|
2021-04-29 13:48:02 +02:00
|
|
|
ansible.builtin.stat:
|
|
|
|
path: '{{ restic_install_path }}/restic'
|
|
|
|
register: restic_installed
|