Remove Debian support

After the original fork I tried to keep minimal Debian support, but it
became clear that I will never test and maintain it - removing the
relevant bits makes more sense than keeping possibly dead code.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-02-06 21:27:49 +01:00
parent f3cd056c75
commit f6e9063626
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
9 changed files with 17 additions and 76 deletions

View File

@ -2,7 +2,8 @@
tor-formula
================
Simple Salt formula to install and configure Tor on Debian and SUSE based distributions.
Simple Salt formula to install and configure Tor on SUSE based distributions.
Forked from https://github.com/upya4ko/salt-tor-formula - thank you.
.. note::

View File

@ -1,9 +1,6 @@
{% from "tor/map.jinja" import map, osfamily with context %}
{% from "tor/map.jinja" import map with context %}
include:
{%- if osfamily == 'Debian' %}
- tor.repo
{%- endif %}
- tor.install
deploy_tor_torrc:
@ -34,8 +31,8 @@ deploy_tor_signing_cert:
set_owner_tor_signing_cert:
file.managed:
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_signing_cert
- user: debian-tor
- group: debian-tor
- user: tor
- group: tor
- mode: 600
- require:
- file: deploy_tor_torrc
@ -59,8 +56,8 @@ deploy_tor_signing_secret_key:
set_owner_tor_signing_secret_key:
file.managed:
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_signing_secret_key
- user: debian-tor
- group: debian-tor
- user: tor
- group: tor
- mode: 600
- require:
- file: deploy_tor_torrc
@ -84,8 +81,8 @@ deploy_tor_master_id_secret_key:
set_owner_tor_master_id_secret_key:
file.managed:
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_master_id_secret_key
- user: debian-tor
- group: debian-tor
- user: tor
- group: tor
- mode: 600
- require:
- file: deploy_tor_torrc
@ -110,8 +107,8 @@ deploy_tor_master_id_public_key:
set_owner_tor_master_id_public_key:
file.managed:
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_master_id_public_key
- user: debian-tor
- group: debian-tor
- user: tor
- group: tor
- mode: 600
- require:
- file: deploy_tor_torrc
@ -128,8 +125,8 @@ deploy_tor_secret_id_key:
file.managed:
- name: {{ map.torrc.DataDirectory }}/keys/secret_id_key
- contents_pillar: tor:secret_id_key
- user: debian-tor
- group: debian-tor
- user: tor
- group: tor
- mode: 600
- require:
- file: deploy_tor_torrc
@ -144,8 +141,8 @@ deploy_tor_fingerprint:
file.managed:
- name: {{ map.torrc.DataDirectory }}/fingerprint
- contents_pillar: tor:fingerprint
- user: debian-tor
- group: debian-tor
- user: tor
- group: tor
- mode: 600
- require:
- file: deploy_tor_torrc

View File

@ -2,11 +2,8 @@ tor:
pkgs:
- tor
service: tor
https_support_pkg: apt-transport-https
config_torrc: '/etc/tor/torrc'
config_torsocks: '/etc/tor/torsocks.conf'
repo_url: 'https://deb.torproject.org/torproject.org'
repo_key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
fingerprint: False
torrc:

View File

@ -1,5 +1,4 @@
include:
- tor.repo
- tor.install
- tor.config

View File

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

View File

@ -1,6 +1,5 @@
{% import_yaml "tor/defaults.yaml" as defaults %}
{% import_yaml "tor/osfamilymap.yaml" as osfamilymap %}
{% set osfamily = salt['grains.get']('os_family', False) %}
{% set map = salt['grains.filter_by'](defaults,

View File

@ -1,11 +1,3 @@
Debian:
pkgs:
- tor
service: tor
config_file: '/etc/tor/torrc'
config_torsocks: '/etc/tor/torsocks.conf'
https_support_pkg: apt-transport-https
Suse:
pkgs:
- tor

View File

@ -1,22 +0,0 @@
{% from "tor/map.jinja" import map with context %}
{% set osfamily = salt['grains.get']('os_family', False) %}
{% if osfamily == 'Debian' %}
{% set codename = salt['grains.get']('lsb_distrib_codename') %}
add_apt_https_support_for_tor:
pkg.installed:
- name: {{ map.https_support_pkg }}
- require_in:
- pkgrepo: install_tor_repo
install_tor_repo:
pkgrepo.managed:
- name: deb {{ map.repo_url }} {{ codename }} main
- file: /etc/apt/sources.list.d/tor.list
- key_url: {{ map.repo_key_url }}
- require:
- pkg: add_apt_https_support_for_tor
{% endif %}

View File

@ -1,6 +1,5 @@
{% from "tor/map.jinja" import map, osfamily with context %}
{% from "tor/map.jinja" import map with context %}
{%- if osfamily == 'Suse' %}
install_torsocks:
pkg.installed:
- name: torsocks
@ -10,7 +9,6 @@ install_torsocks:
- enable: True
- require:
- pkg: install_torsocks
{%- endif %}
deploy_tor_torsocks:
file.managed:
@ -23,17 +21,6 @@ deploy_tor_torsocks:
- defaults:
config: {{ map.torsocks }}
- require:
{%- if osfamily == 'Suse' %}
- pkg: install_torsocks
{%- else %}
- pkg: install_tor
{%- endif %}
- watch_in:
{%- if osfamily == 'Suse' %}
- service: install_torsocks
{%- else %}
- service: install_tor
{%- endif %}