2020-07-10 00:58:55 +02:00
|
|
|
---
|
|
|
|
{%- 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
|
2022-06-10 00:13:19 +02:00
|
|
|
- mode: "0660"
|
2020-07-10 00:58:55 +02:00
|
|
|
- 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
|