paulbsd-salt/states/transmission/config.sls
Paul Lecuq 3c044aca2f
All checks were successful
continuous-integration/drone/push Build is passing
updated transmission state
2024-03-10 18:42:11 +01:00

42 lines
1.1 KiB
Plaintext

---
{%- from "transmission/map.jinja" import transmission with context %}
transmission-dl-dir:
file.directory:
- name: {{ transmission['config']['download-dir'] }}
- makedirs: true
- user: {{ transmission.user }}
- group: {{ transmission.group }}
- mode: 755
- recurse:
- user
- group
- mode
transmission-settings-directory:
file.directory:
- name: /etc/transmission-daemon
- user: root
- group: debian-transmission
- mode: 770
transmission-settings-master:
file.managed:
- name: {{ transmission.config_dir }}/settings.json.master
- source: salt://transmission/templates/settings.json.j2
- user: {{ transmission.user }}
- group: {{ transmission.group }}
- mode: 0660
- template: jinja
- watch_in:
- service: transmission-service
transmission-settings:
file.managed:
- name: {{ transmission.config_dir }}/settings.json
- source: salt://transmission/templates/settings.json.j2
- user: {{ transmission.user }}
- group: {{ transmission.group }}
- mode: 0660
- template: jinja