Use distribution restic
This commit is contained in:
parent
f6d22f01da
commit
ee760ad143
@ -207,7 +207,7 @@ class RepoManager(abc.ABC):
|
||||
aws_bucket_endpoint=self._config["aws_bucket_endpoint"],
|
||||
aws_keys=aws_keys,
|
||||
restic_cmd_base=[
|
||||
"/usr/local/bin/restic",
|
||||
"/usr/bin/restic",
|
||||
"--password-file", self._config["restic_password_file"],
|
||||
"--option", "s3.storage-class=ONEZONE_IA",
|
||||
],
|
||||
|
@ -1,32 +1,7 @@
|
||||
---
|
||||
- name: "check if restic is installed"
|
||||
ansible.builtin.stat:
|
||||
path: "/usr/local/bin/restic"
|
||||
register: backups_restic_binary_path
|
||||
|
||||
- block:
|
||||
|
||||
- name: "download restic binary"
|
||||
ansible.builtin.get_url:
|
||||
url: "\
|
||||
https://github.com/restic/restic/releases/download/v0.14.0/restic_0.14.0_linux_amd64.bz2"
|
||||
dest: "/usr/local/bin/restic.bz2"
|
||||
mode: 0644
|
||||
|
||||
- name: "install bzip2"
|
||||
ansible.builtin.apt:
|
||||
name: "bzip2"
|
||||
|
||||
- name: "unpack restic binary"
|
||||
command: "bunzip2 /usr/local/bin/restic.bz2"
|
||||
|
||||
when:
|
||||
not backups_restic_binary_path.stat.exists
|
||||
|
||||
- name: "ensure restic is executable"
|
||||
ansible.builtin.file:
|
||||
path: "/usr/local/bin/restic"
|
||||
mode: 0755
|
||||
- name: "install restic"
|
||||
ansible.builtin.apt:
|
||||
name: "restic"
|
||||
|
||||
- name: "create a cache directory for restic"
|
||||
ansible.builtin.file:
|
||||
|
Loading…
Reference in New Issue
Block a user