-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplaybook.yml
74 lines (70 loc) · 2.4 KB
/
playbook.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
- name: Kali Linux Vagrant Provisioner
hosts: all
remote_user: vagrant
become: yes
become_method: sudo
tasks:
- name: Install Miniconda
become: yes
become_user: vagrant
become_method: su
block:
- name: Make miniconda directory
ansible.builtin.file:
path: ~/miniconda3
state: directory
mode: 0755
- name: Download miniconda
ansible.builtin.get_url:
url: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
dest: ~/miniconda3/miniconda.sh
mode: 0550
- name: Install miniconda
ansible.builtin.shell: bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
- name: Remove the installer
ansible.builtin.file:
path: ~/miniconda3/miniconda.sh
state: absent
- name: Init bash
ansible.builtin.shell: ~/miniconda3/bin/conda init bash
- name: Init zsh
ansible.builtin.shell: ~/miniconda3/bin/conda init zsh
- name: Install Tools
block:
- name: apt install
apt:
name: "{{ item }}"
update_cache: true
loop:
- keepassxc
- name: Configure Tor Whonix Gateway
block:
- name: Establish connections
ansible.builtin.shell: sudo nmcli connection add con-name whonix ifname eth1 type ethernet autoconnect yes ipv4.addresses 10.152.152.12/18 ipv4.gateway 10.152.152.10 ipv4.method manual
- name: Add nameserver to resolver
ansible.builtin.shell: sudo sed -i '$a nameserver 10.152.152.10' /etc/resolv.conf
- name: Start connection
ansible.builtin.shell: sudo nmcli connection up whonix
- name: Report active connections
ansible.builtin.shell: sudo nmcli connection show --active
- name: Report status
ansible.builtin.shell: sudo nmcli device status
#- name: Copy worker.kdbx
# ansible.builtin.copy:
# src: ./worker.kdbx
# dest: /home/vagrant/worker.kdbx
# owner: vagrant
# mode: '0644'
#- name: Copy load_worker_ssh.sh
# ansible.builtin.copy:
# src: ./load_worker_ssh.sh
# dest: /home/vagrant/load_worker_ssh.sh
# owner: vagrant
# mode: preserve
- name: Copy eth0_down.sh
ansible.builtin.copy:
src: ./eth0_down.sh
dest: /home/vagrant/eth0_down.sh
owner: vagrant
mode: preserve