Move torsocks to separate state

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-02-05 18:24:50 +01:00
parent 8b42ef5723
commit 500cc24176
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
2 changed files with 19 additions and 16 deletions

View File

@ -21,22 +21,6 @@ deploy_tor_torrc:
- watch_in:
- service: install_tor
deploy_tor_torsocks:
file.managed:
- name: {{ map.config_torsocks }}
- source: salt://{{ slspath }}/files/ini.jinja
- user: root
- group: root
- mode: 644
- template: jinja
- defaults:
config: {{ map.torsocks }}
- require:
- pkg: install_tor
- watch_in:
- service: install_tor
{% if salt['pillar.get']('tor:ed25519_signing_cert', False) %}
deploy_tor_signing_cert:

19
tor/torsocks.sls Normal file
View File

@ -0,0 +1,19 @@
{% from "tor/map.jinja" import map with context %}
deploy_tor_torsocks:
file.managed:
- name: {{ map.config_torsocks }}
- source: salt://{{ slspath }}/files/ini.jinja
- user: root
- group: root
- mode: 644
- template: jinja
- defaults:
config: {{ map.torsocks }}
- require:
- pkg: install_tor
- watch_in:
- service: install_tor