updated borg state
This commit is contained in:
parent
160a186f65
commit
6904e6bcf1
@ -14,3 +14,12 @@ borg-config-script-{{ key }}:
|
||||
job: {{ job }}
|
||||
working_dir: {{ borg.working_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
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
borg:
|
||||
enabled: true
|
||||
run_user: dkron
|
||||
working_dir: /opt/borg
|
||||
pip_pkgs:
|
||||
- borgbackup
|
||||
|
@ -1,6 +1,5 @@
|
||||
---
|
||||
{%- from "borg/map.jinja" import borg with context %}
|
||||
|
||||
{%- for pkg in borg.pip_pkgs %}
|
||||
borg-pkg-reqs-{{ pkg }}:
|
||||
pip.installed:
|
||||
|
3
states/borg/templates/borg_sudo.j2
Executable file
3
states/borg/templates/borg_sudo.j2
Executable 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
|
Loading…
Reference in New Issue
Block a user