summaryrefslogtreecommitdiffstats
path: root/roles/restic/tasks
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-06-27 00:33:35 +0200
committerAhmed Abdelhalim <[email protected]>2026-06-27 00:34:50 +0200
commit27b34c0a674bdc63be340917d5aadb4952bd705a (patch)
tree8c1cda52afd8eb55f4f61e1f71e14e8b9871db1e /roles/restic/tasks
parent3263296093c86aa2165777e74f7d28bfd442160f (diff)
Add restic role w/testing
Diffstat (limited to 'roles/restic/tasks')
-rw-r--r--roles/restic/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
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