mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2025-10-15 21:50:09 +00:00
switched to roles
- all tasks/* have been moved to their own roles in roles/* - each file && template is now oragnized per-role - annotated each task which still isn't idempotent !TODO!
This commit is contained in:
30
roles/tor/tasks/main.yml
Normal file
30
roles/tor/tasks/main.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: Install torrc
|
||||
template:
|
||||
src: torrc
|
||||
dest: /etc/tor/torrc
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=r
|
||||
|
||||
- name: Create Tor HS directory
|
||||
file:
|
||||
path: /var/lib/tor/{{ domain }}
|
||||
state: directory
|
||||
owner: debian-tor
|
||||
group: debian-tor
|
||||
mode: u=rwx,g=,o=
|
||||
|
||||
- name: Set Tor HS keys
|
||||
copy:
|
||||
src: secrets/hs_ed25519_secret_key
|
||||
dest: /var/lib/tor/{{ domain }}/hs_ed25519_secret_key
|
||||
owner: debian-tor
|
||||
group: debian-tor
|
||||
mode: u=rw,g=,o=
|
||||
|
||||
- name: Enable Tor Service
|
||||
systemd:
|
||||
name: tor
|
||||
enabled: yes
|
||||
state: started
|
2
roles/tor/templates/torrc
Normal file
2
roles/tor/templates/torrc
Normal file
@@ -0,0 +1,2 @@
|
||||
HiddenServiceDir /var/lib/tor/{{ domain }}
|
||||
HiddenServicePort 80 127.0.0.1:2171
|
Reference in New Issue
Block a user