paulbsd-salt/states/tor/init.sls
Paul Lecuq 24500ff074
Some checks failed
continuous-integration/drone/push Build is failing
updated states (lints) / updated .drone.yml
2022-06-10 00:13:19 +02:00

29 lines
521 B
Plaintext

---
{%- from "tor/map.jinja" import tor with context %}
tor-pkg:
pkg.latest:
- name: tor
tor-config:
file.managed:
- name: /etc/tor/torrc
- source: salt://tor/torrc.j2
- user: root
- group: root
- mode: "0660"
- template: jinja
- watch_in:
- service: tor-service
- require:
- pkg: tor-pkg
tor-service:
{%- if tor.enabled %}
service.running:
{%- else %}
service.dead:
{%- endif %}
- name: tor
- enable: {{ tor.enabled }}
- require:
- pkg: tor-pkg