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:
parent
f3cd056c75
commit
f6e9063626
@ -2,7 +2,8 @@
|
|||||||
tor-formula
|
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::
|
.. note::
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
{% from "tor/map.jinja" import map, osfamily with context %}
|
{% from "tor/map.jinja" import map with context %}
|
||||||
|
|
||||||
include:
|
include:
|
||||||
{%- if osfamily == 'Debian' %}
|
|
||||||
- tor.repo
|
|
||||||
{%- endif %}
|
|
||||||
- tor.install
|
- tor.install
|
||||||
|
|
||||||
deploy_tor_torrc:
|
deploy_tor_torrc:
|
||||||
@ -34,8 +31,8 @@ deploy_tor_signing_cert:
|
|||||||
set_owner_tor_signing_cert:
|
set_owner_tor_signing_cert:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_signing_cert
|
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_signing_cert
|
||||||
- user: debian-tor
|
- user: tor
|
||||||
- group: debian-tor
|
- group: tor
|
||||||
- mode: 600
|
- mode: 600
|
||||||
- require:
|
- require:
|
||||||
- file: deploy_tor_torrc
|
- file: deploy_tor_torrc
|
||||||
@ -59,8 +56,8 @@ deploy_tor_signing_secret_key:
|
|||||||
set_owner_tor_signing_secret_key:
|
set_owner_tor_signing_secret_key:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_signing_secret_key
|
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_signing_secret_key
|
||||||
- user: debian-tor
|
- user: tor
|
||||||
- group: debian-tor
|
- group: tor
|
||||||
- mode: 600
|
- mode: 600
|
||||||
- require:
|
- require:
|
||||||
- file: deploy_tor_torrc
|
- file: deploy_tor_torrc
|
||||||
@ -84,8 +81,8 @@ deploy_tor_master_id_secret_key:
|
|||||||
set_owner_tor_master_id_secret_key:
|
set_owner_tor_master_id_secret_key:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_master_id_secret_key
|
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_master_id_secret_key
|
||||||
- user: debian-tor
|
- user: tor
|
||||||
- group: debian-tor
|
- group: tor
|
||||||
- mode: 600
|
- mode: 600
|
||||||
- require:
|
- require:
|
||||||
- file: deploy_tor_torrc
|
- file: deploy_tor_torrc
|
||||||
@ -110,8 +107,8 @@ deploy_tor_master_id_public_key:
|
|||||||
set_owner_tor_master_id_public_key:
|
set_owner_tor_master_id_public_key:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_master_id_public_key
|
- name: {{ map.torrc.DataDirectory }}/keys/ed25519_master_id_public_key
|
||||||
- user: debian-tor
|
- user: tor
|
||||||
- group: debian-tor
|
- group: tor
|
||||||
- mode: 600
|
- mode: 600
|
||||||
- require:
|
- require:
|
||||||
- file: deploy_tor_torrc
|
- file: deploy_tor_torrc
|
||||||
@ -128,8 +125,8 @@ deploy_tor_secret_id_key:
|
|||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.torrc.DataDirectory }}/keys/secret_id_key
|
- name: {{ map.torrc.DataDirectory }}/keys/secret_id_key
|
||||||
- contents_pillar: tor:secret_id_key
|
- contents_pillar: tor:secret_id_key
|
||||||
- user: debian-tor
|
- user: tor
|
||||||
- group: debian-tor
|
- group: tor
|
||||||
- mode: 600
|
- mode: 600
|
||||||
- require:
|
- require:
|
||||||
- file: deploy_tor_torrc
|
- file: deploy_tor_torrc
|
||||||
@ -144,8 +141,8 @@ deploy_tor_fingerprint:
|
|||||||
file.managed:
|
file.managed:
|
||||||
- name: {{ map.torrc.DataDirectory }}/fingerprint
|
- name: {{ map.torrc.DataDirectory }}/fingerprint
|
||||||
- contents_pillar: tor:fingerprint
|
- contents_pillar: tor:fingerprint
|
||||||
- user: debian-tor
|
- user: tor
|
||||||
- group: debian-tor
|
- group: tor
|
||||||
- mode: 600
|
- mode: 600
|
||||||
- require:
|
- require:
|
||||||
- file: deploy_tor_torrc
|
- file: deploy_tor_torrc
|
||||||
|
@ -2,11 +2,8 @@ tor:
|
|||||||
pkgs:
|
pkgs:
|
||||||
- tor
|
- tor
|
||||||
service: tor
|
service: tor
|
||||||
https_support_pkg: apt-transport-https
|
|
||||||
config_torrc: '/etc/tor/torrc'
|
config_torrc: '/etc/tor/torrc'
|
||||||
config_torsocks: '/etc/tor/torsocks.conf'
|
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
|
fingerprint: False
|
||||||
|
|
||||||
torrc:
|
torrc:
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
|
|
||||||
include:
|
include:
|
||||||
- tor.repo
|
|
||||||
- tor.install
|
- tor.install
|
||||||
- tor.config
|
- tor.config
|
||||||
|
@ -1,17 +1,8 @@
|
|||||||
{% from "tor/map.jinja" import map, osfamily with context %}
|
{% from "tor/map.jinja" import map with context %}
|
||||||
|
|
||||||
{%- if osfamily == 'Debian' %}
|
|
||||||
include:
|
|
||||||
- tor.repo
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
install_tor:
|
install_tor:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- pkgs: {{ map.pkgs }}
|
- pkgs: {{ map.pkgs }}
|
||||||
{%- if osfamily == 'Debian' %}
|
|
||||||
- require:
|
|
||||||
- pkgrepo: install_tor_repo
|
|
||||||
{%- endif %}
|
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ map.service }}
|
- name: {{ map.service }}
|
||||||
- restart: True
|
- restart: True
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{% import_yaml "tor/defaults.yaml" as defaults %}
|
{% import_yaml "tor/defaults.yaml" as defaults %}
|
||||||
{% import_yaml "tor/osfamilymap.yaml" as osfamilymap %}
|
{% import_yaml "tor/osfamilymap.yaml" as osfamilymap %}
|
||||||
{% set osfamily = salt['grains.get']('os_family', False) %}
|
|
||||||
|
|
||||||
{% set map = salt['grains.filter_by'](defaults,
|
{% set map = salt['grains.filter_by'](defaults,
|
||||||
|
|
||||||
|
@ -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:
|
Suse:
|
||||||
pkgs:
|
pkgs:
|
||||||
- tor
|
- tor
|
||||||
|
22
tor/repo.sls
22
tor/repo.sls
@ -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 %}
|
|
@ -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:
|
install_torsocks:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: torsocks
|
- name: torsocks
|
||||||
@ -10,7 +9,6 @@ install_torsocks:
|
|||||||
- enable: True
|
- enable: True
|
||||||
- require:
|
- require:
|
||||||
- pkg: install_torsocks
|
- pkg: install_torsocks
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
deploy_tor_torsocks:
|
deploy_tor_torsocks:
|
||||||
file.managed:
|
file.managed:
|
||||||
@ -23,17 +21,6 @@ deploy_tor_torsocks:
|
|||||||
- defaults:
|
- defaults:
|
||||||
config: {{ map.torsocks }}
|
config: {{ map.torsocks }}
|
||||||
- require:
|
- require:
|
||||||
{%- if osfamily == 'Suse' %}
|
|
||||||
- pkg: install_torsocks
|
- pkg: install_torsocks
|
||||||
{%- else %}
|
|
||||||
- pkg: install_tor
|
|
||||||
{%- endif %}
|
|
||||||
- watch_in:
|
- watch_in:
|
||||||
{%- if osfamily == 'Suse' %}
|
|
||||||
- service: install_torsocks
|
- service: install_torsocks
|
||||||
{%- else %}
|
|
||||||
- service: install_tor
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user