Kapisi/roles/DarkNet/tasks/main.yml

68 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2020-10-08 16:33:19 -05:00
---
2020-11-02 16:15:47 -06:00
- name: DarkNet packages
become: yes
package:
name:
- deluge
- deluge-gtk
- openvpn
- nordvpn-bin
- tor
- torsocks
- tor-browser-en
2022-12-18 22:24:44 -06:00
- 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
2020-11-02 16:15:47 -06:00
- name: "Enable daemons"
become: yes
service:
name: "{{ item }}"
state: started
enabled: yes
loop:
2022-12-18 22:24:44 -06:00
- tor.service
- nordvpnd.service
- deluged.service
- openvpn-client@darknet.service
2020-11-02 16:15:47 -06:00
2022-12-18 22:24:44 -06:00
- 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