updated borg state

This commit is contained in:
Paul 2021-03-20 10:40:09 +01:00
parent 160a186f65
commit 6904e6bcf1
4 changed files with 13 additions and 1 deletions

View File

@ -14,3 +14,12 @@ borg-config-script-{{ key }}:
job: {{ job }} job: {{ job }}
working_dir: {{ borg.working_dir }} working_dir: {{ borg.working_dir }}
{% endfor %} {% 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

View File

@ -1,6 +1,7 @@
--- ---
borg: borg:
enabled: true enabled: true
run_user: dkron
working_dir: /opt/borg working_dir: /opt/borg
pip_pkgs: pip_pkgs:
- borgbackup - borgbackup

View File

@ -1,6 +1,5 @@
--- ---
{%- from "borg/map.jinja" import borg with context %} {%- from "borg/map.jinja" import borg with context %}
{%- for pkg in borg.pip_pkgs %} {%- for pkg in borg.pip_pkgs %}
borg-pkg-reqs-{{ pkg }}: borg-pkg-reqs-{{ pkg }}:
pip.installed: pip.installed:

View File

@ -0,0 +1,3 @@
{%- from "borg/map.jinja" import borg with context %}
## Sudo rights for borg run_user
{{ borg.run_user }} ALL=(ALL) NOPASSWD: {{ borg.working_dir }}/scripts/borg_*.sh