From 27b34c0a674bdc63be340917d5aadb4952bd705a Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Sat, 27 Jun 2026 00:33:35 +0200 Subject: Add restic role w/testing --- roles/restic/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 roles/restic/tasks/main.yml (limited to 'roles/restic/tasks') diff --git a/roles/restic/tasks/main.yml b/roles/restic/tasks/main.yml new file mode 100644 index 00000000..ae82d3bc --- /dev/null +++ b/roles/restic/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- name: "Check installed restic versions" + ansible.builtin.command: + cmd: "mise ls restic" + register: restic_installed_versions + changed_when: false + +- name: "Install restic" + ansible.builtin.command: + cmd: "mise use --global restic@{{ restic_version }}" + changed_when: true + when: restic_version not in restic_installed_versions.stdout -- cgit v1.2.3