paulbsd-salt/states/borg/config.sls
Paul Lecuq 1b59cdacdd * Update salt states
- bl module updated
- borg state updated
- config state updated
- netbox state updated
- nginx state updated
- misc updates
2022-02-21 13:52:46 +01:00

28 lines
705 B
Plaintext

---
{%- from "borg/map.jinja" import borg with context %}
{% for key, job in borg.jobs.items() %}
borg-config-script-{{ key }}:
file.managed:
- name: {{ borg.working_dir }}/scripts/borg_{{ key }}.sh
- source: salt://borg/templates/borg_job.sh.j2
- template: jinja
- user: root
- group: root
- mode: 0700
- context:
key: {{ key }}
job: {{ job }}
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