Kapisi/roles/DarkNet/tasks/main.yml

68 lines
1.4 KiB
YAML

---
- name: DarkNet packages
become: yes
package:
name:
- deluge
- deluge-gtk
- openvpn
- nordvpn-bin
- tor
- torsocks
- tor-browser-en
- name: OpenVPN config
become: yes
get_url:
url: "{{ secrets.DarkNet.vpnserver }}"
dest: /etc/openvpn/client/darknet.conf
mode: 0600
owner: openvpn
group: network
- name: OpenVPN Auth part 1
become: yes
lineinfile:
path: /etc/openvpn/client/darknet.conf
regexp: ^auth-user-pass
line: auth-user-pass /etc/openvpn/client/darknet.auth
- name: OpenVPN Auth part 2
become: yes
lineinfile:
path: /etc/openvpn/client/darknet.conf
regexp: ^dev
line: dev tun0
- name: OpenVPN Auth part 3
become: yes
copy:
dest: /etc/openvpn/client/darknet.auth
content: "{{ secrets.DarkNet.token }}"
mode: 0600
owner: openvpn
group: network
- name: "Enable daemons"
become: yes
service:
name: "{{ item }}"
state: started
enabled: yes
loop:
- tor.service
- nordvpnd.service
- deluged.service
- openvpn-client@darknet.service
- name: BashRC customization
become: yes
copy:
dest: /etc/profile.d/darknet
content: |
alias torlynx='torsocks elinks https://check.torproject.org/'
mode: 0644
owner: root
group: root