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
75
76
77
78
79
80
81
82
83
84
85
|
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/debian-12"
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
apt-get install -y python3 openssh-server sshpass
systemctl enable ssh
SHELL
config.vm.define "control", primary: true do |control|
control.vm.hostname = "control"
control.vm.network "private_network", ip: "192.168.56.1", virtualbox__intnet: true
control.vm.synced_folder "../..", "/home/vagrant/infra", type: "rsync", rsync__exclude: ['.git-crypt', '.ruff_cache', 'dns', 'docs', 'kubernetes', 'venv', '.gitattributes', '.git', '.gitmodules', '.gitignore', '.pre-commit-config.yaml', 'LICENSE', 'README.md', 'server_bootstrap.sh', 'ansible/.ansible']
control.vm.provision "Install poetry", type: "shell", inline: <<-SHELL
apt-get install -y python3-poetry
SHELL
control.vm.provision "Generate ssh keys", type: "shell", privileged: false, inline: <<-SHELL
ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< y
SHELL
control.vm.provision "Install dependencies", type: "shell", privileged: false, inline: <<-SHELL
cd /home/vagrant/infra
sudo poetry config virtualenvs.create false
sudo PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install --only ansible --no-root
cd ansible/
ansible-galaxy install -r roles/requirements.yml
SHELL
control.vm.provider "virtualbox" do |v|
v.name = "pydis_control"
end
end
config.vm.define "hopper" do |hopper|
hopper.vm.hostname = "hopper"
hopper.vm.network "private_network", ip: "192.168.56.2",
virtualbox__intnet: true
hopper.vm.synced_folder '.', '/vagrant', disabled: true
hopper.vm.provider "virtualbox" do |v|
v.name = "pydis_hopper"
v.memory = 2048
end
end
config.vm.define "lovelace" do |lovelace|
lovelace.vm.hostname = "lovelace"
lovelace.vm.network "private_network", ip: "192.168.56.3",
virtualbox__intnet: true
lovelace.vm.synced_folder '.', '/vagrant', disabled: true
lovelace.vm.provider "virtualbox" do |v|
v.name = "pydis_lovelace"
v.memory = 2048
end
end
config.vm.define "neumann" do |neumann|
neumann.vm.hostname = "neumann"
neumann.vm.network "private_network", ip: "192.168.56.4",
virtualbox__intnet: true
neumann.vm.synced_folder '.', '/vagrant', disabled: true
neumann.vm.provider "virtualbox" do |v|
v.name = "pydis_neumann"
v.memory = 2048
end
end
config.vm.define "ritchie" do |ritchie|
ritchie.vm.hostname = "ritchie"
ritchie.vm.network "private_network", ip: "192.168.56.5",
virtualbox__intnet: true
ritchie.vm.synced_folder '.', '/vagrant', disabled: true
ritchie.vm.provider "virtualbox" do |v|
v.name = "pydis_ritchie"
v.memory = 2048
end
end
end
|