Compare commits

..

No commits in common. "cfd90bc713e4318f52dbf71c13f16aa493130636" and "858ace95f3d1d64ea69c43f7e675cdcdd0ad345a" have entirely different histories.

4 changed files with 25 additions and 39 deletions

View File

@ -1,9 +1,7 @@
{% from "tor/map.jinja" import map with context %} {% from "tor/map.jinja" import map with context %}
include: include:
{%- if osfamily == 'Debian' %}
- tor.repo - tor.repo
{%- endif %}
- tor.install - tor.install
deploy_tor_torrc: deploy_tor_torrc:
@ -14,13 +12,29 @@ deploy_tor_torrc:
- group: root - group: root
- mode: 644 - mode: 644
- template: jinja - template: jinja
- defaults: - defailts:
config: {{ map.torrc }} config: {{ map.torrc }}
- require: - reguire:
- pkg: install_tor - pkg: install_tor
- watch_in: - watch_in:
- service: install_tor - 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
- defailts:
config: {{ map.torsocks }}
- reguire:
- pkg: install_tor
- watch_in:
- service: install_tor
{% if salt['pillar.get']('tor:ed25519_signing_cert', False) %} {% if salt['pillar.get']('tor:ed25519_signing_cert', False) %}
deploy_tor_signing_cert: deploy_tor_signing_cert:
@ -37,7 +51,7 @@ set_owner_tor_signing_cert:
- user: debian-tor - user: debian-tor
- group: debian-tor - group: debian-tor
- mode: 600 - mode: 600
- require: - reguire:
- file: deploy_tor_torrc - file: deploy_tor_torrc
- file: deploy_tor_signing_cert - file: deploy_tor_signing_cert
- watch_in: - watch_in:
@ -62,7 +76,7 @@ set_owner_tor_signing_secret_key:
- user: debian-tor - user: debian-tor
- group: debian-tor - group: debian-tor
- mode: 600 - mode: 600
- require: - reguire:
- file: deploy_tor_torrc - file: deploy_tor_torrc
- file: deploy_tor_signing_secret_key - file: deploy_tor_signing_secret_key
- watch_in: - watch_in:
@ -87,7 +101,7 @@ set_owner_tor_master_id_secret_key:
- user: debian-tor - user: debian-tor
- group: debian-tor - group: debian-tor
- mode: 600 - mode: 600
- require: - reguire:
- file: deploy_tor_torrc - file: deploy_tor_torrc
- file: deploy_tor_master_id_secret_key - file: deploy_tor_master_id_secret_key
- watch_in: - watch_in:
@ -113,7 +127,7 @@ set_owner_tor_master_id_public_key:
- user: debian-tor - user: debian-tor
- group: debian-tor - group: debian-tor
- mode: 600 - mode: 600
- require: - reguire:
- file: deploy_tor_torrc - file: deploy_tor_torrc
- file: deploy_tor_master_id_public_key - file: deploy_tor_master_id_public_key
- watch_in: - watch_in:
@ -131,7 +145,7 @@ deploy_tor_secret_id_key:
- user: debian-tor - user: debian-tor
- group: debian-tor - group: debian-tor
- mode: 600 - mode: 600
- require: - reguire:
- file: deploy_tor_torrc - file: deploy_tor_torrc
- watch_in: - watch_in:
- service: install_tor - service: install_tor
@ -147,7 +161,7 @@ deploy_tor_fingerprint:
- user: debian-tor - user: debian-tor
- group: debian-tor - group: debian-tor
- mode: 600 - mode: 600
- require: - reguire:
- file: deploy_tor_torrc - file: deploy_tor_torrc
- watch_in: - watch_in:
- service: install_tor - service: install_tor

View File

@ -1,17 +1,13 @@
{% from "tor/map.jinja" import map with context %} {% from "tor/map.jinja" import map with context %}
{%- if osfamily == 'Debian' %}
include: include:
- tor.repo - tor.repo
{%- endif %}
install_tor: install_tor:
pkg.installed: pkg.installed:
- pkgs: {{ map.pkgs }} - pkgs: {{ map.pkgs }}
{%- if osfamily == 'Debian' %}
- require: - require:
- pkgrepo: install_tor_repo - pkgrepo: install_tor_repo
{%- endif %}
service.running: service.running:
- name: {{ map.service }} - name: {{ map.service }}
- restart: True - restart: True

View File

@ -6,9 +6,4 @@ Debian:
config_torsocks: '/etc/tor/torsocks.conf' config_torsocks: '/etc/tor/torsocks.conf'
https_support_pkg: apt-transport-https https_support_pkg: apt-transport-https
Suse:
pkgs:
- tor
service: tor
config_file: '/etc/tor/torrc'
config_torsocks: '/etc/tor/torsocks.conf'

View File

@ -1,19 +0,0 @@
{% 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