paulbsd-salt/states/borg/config.sls

28 lines
727 B
Plaintext
Raw Normal View History

2020-09-22 21:09:05 +02:00
---
{%- from "borg/map.jinja" import borg with context %}
2023-12-04 22:34:29 +01:00
{% for name, params in borg.jobs.items() %}
borg-config-script-{{ name }}:
2020-09-22 21:09:05 +02:00
file.managed:
2023-12-04 22:34:29 +01:00
- name: {{ borg.working_dir }}/scripts/borg_{{ name }}.sh
2020-09-22 21:09:05 +02:00
- source: salt://borg/templates/borg_job.sh.j2
- template: jinja
- user: root
- group: root
2020-10-10 23:21:29 +02:00
- mode: 0700
2020-09-22 21:09:05 +02:00
- context:
2023-12-04 22:34:29 +01:00
name: {{ name }}
params: {{ params }}
2023-01-20 13:23:56 +01:00
working_dir: {{ borg.working_dir }}
log_dir: {{ borg.log_dir }}
2020-09-22 21:09:05 +02:00
{% endfor %}
2021-03-20 10:40:09 +01:00
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
2021-08-28 12:13:24 +02:00
- check_cmd: /usr/sbin/visudo -c -f