install tor

This needs a firejail profile and a config option to specify when to
start the service.
This commit is contained in:
Pig Monkey 2016-07-29 21:00:02 -07:00
parent 74371b72b1
commit 98a8fcfe02
4 changed files with 26 additions and 0 deletions

View file

@ -55,6 +55,7 @@
- { role: postgresql, tags: ['postgresql'] }
- { role: calibre, tags: ['calibre'] }
- { role: cli53, tags: ['cli53'] }
- { role: tor, tags: ['tor'] }
vars_prompt:
- name: user_password
prompt: "Enter desired user password"

View file

@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=/usr/bin/firejail --writable-var /usr/bin/tor -f /etc/tor/torrc

4
roles/tor/meta/main.yml Normal file
View file

@ -0,0 +1,4 @@
---
dependencies:
- { role: firejail }
- { role: systemd }

18
roles/tor/tasks/main.yml Normal file
View file

@ -0,0 +1,18 @@
---
- name: Install Tor
pacman: name={{ item }} state=present
with_items:
- tor
- torsocks
- name: Create Tor systemd unit file directory
file: path=/etc/systemd/system/tor.service.d state=directory
tags:
- firejail
- name: Push Tor socket unit file
copy: src=tor-service-override.conf dest=/etc/systemd/system/tor.service.d/override.conf
notify:
- reload systemd config
tags:
- firejail