20 lines
476 B
Plaintext
20 lines
476 B
Plaintext
|
{% if pillar.restic.repository is defined %}
|
||
|
include:
|
||
|
- restic.repository
|
||
|
{% endif %}
|
||
|
|
||
|
Install restic packages:
|
||
|
pkg.installed:
|
||
|
- pkgs:
|
||
|
- restic
|
||
|
- restic-bash-completion
|
||
|
|
||
|
Copy backup script for {{ pillar.restic.user }}:
|
||
|
file.managed:
|
||
|
- name: {{ salt['user.info'](pillar.restic.user).home }}/bin/backup.sh
|
||
|
- source: salt://restic/files/backup.sh.jinja
|
||
|
- template: jinja
|
||
|
- user: {{ pillar.restic.user }}
|
||
|
- group: root
|
||
|
- mode: "0740"
|