paulbsd-salt/states/borg/config.sls
2023-12-04 22:34:29 +01:00

28 lines
727 B
Plaintext

---
{%- from "borg/map.jinja" import borg with context %}
{% for name, params in borg.jobs.items() %}
borg-config-script-{{ name }}:
file.managed:
- name: {{ borg.working_dir }}/scripts/borg_{{ name }}.sh
- source: salt://borg/templates/borg_job.sh.j2
- template: jinja
- user: root
- group: root
- mode: 0700
- context:
name: {{ name }}
params: {{ params }}
working_dir: {{ borg.working_dir }}
log_dir: {{ borg.log_dir }}
{% endfor %}
borg-config-sudo:
file.managed:
- name: /etc/sudoers.d/borg
- source: salt://borg/templates/borg_sudo.j2
- template: jinja
- user: root
- group: root
- mode: 600
- check_cmd: /usr/sbin/visudo -c -f