-
Notifications
You must be signed in to change notification settings - Fork 0
/
darkweb.yml
31 lines (31 loc) · 1.37 KB
/
darkweb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- name: a play that runs entirely on the ansible host
hosts: 127.0.0.1
connection: local
tasks:
- name: install apache
action: apt pkg=apache2 state=latest
- name: add new sources
lineinfile: dest=/etc/apt/sources.list line="deb http://deb.torproject.org/torproject.org trusty main"
- name: add new sources2
lineinfile: dest=/etc/apt/sources.list line="deb-src http://deb.torproject.org/torproject.org trusty main"
- name: add keys
command: gpg --keyserver keys.gnupg.net --recv 886DDD89
command: gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
- name: update
action: apt update_cache=yes
- name: install tor
command: apt-get -y --force-yes install tor deb.torproject.org-keyring
- name: remove apparmor protection
lineinfile: dest=/etc/apparmor.d/local/system_tor line="/home/tordir/* rwmk,"
- name: restart apparmor
command: sudo service apparmor restart
- name: Creates directory
file: path=/home/tordir state=directory owner=debian-tor mode=0700 recurse=yes
- name: configuration options
lineinfile: dest=/etc/tor/torrc line="HiddenServiceDir /home/tordir/"
- name: config options
lineinfile: dest=/etc/tor/torrc line="HiddenServicePort 80 127.0.0.1:80"
- name: tor restart
command: service tor restart
- name: print out tor hostname
action: command cat /home/tordir/hostname