This commit is contained in:
root
2020-05-09 13:50:53 -04:00
parent fc2ea8f76b
commit 94cf5ca183
5 changed files with 23 additions and 4 deletions

7
restic/client.sls Normal file
View File

@@ -0,0 +1,7 @@
{% from "restic/map.jinja" import url with context %}
'download restic':
cmd.run:
- name: 'wget {{url}} -O - | bzip2 -cd > /bin/restic ; chmod +x /bin/restic'
- unless: stat /bin/restic

6
restic/map.jinja Normal file
View File

@@ -0,0 +1,6 @@
{% if salt.grains.get('cpuarch').startswith('arm') %}
{% set url = 'https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_linux_arm.bz2' %}
{% else %}
{% set url = 'https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_linux_amd64.bz2' %}
{% endif %}