-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
61 lines (51 loc) · 1.75 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "bento/debian-12.5"
if Vagrant::Plugin::Manager.instance.plugin_installed?('vagrant-vbguest')
config.vbguest.auto_update = false
config.vbguest.no_install = true
end
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
config.vm.network "private_network", ip: "192.168.57.10"
# config.vm.network "public_network"
config.vm.synced_folder "./ansible/", "/vagrant", type: "rsync"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
# Customize the amount of memory on the VM:
vb.memory = "8192"
vb.cpus = "2"
end
config.vm.provision 'shell' do |shell|
content = %(
apt-get update
apt-get dist-upgrade -y
apt-get install bash-completion python-is-python3 python-dev-is-python3 python3-pip -y
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
)
shell.inline = content
shell.reboot = false
end
config.vm.provision 'shell' do |shell|
content = %(
echo 'set -g default-terminal "tmux-256color"' >> ~/.tmux.conf
)
shell.inline = content
shell.privileged = false
end
config.vm.provision 'ansible_local' do |ansible|
ansible.install = true
ansible.compatibility_mode = "2.0"
ansible.playbook = "playbook.yml"
#ansible.install_mode = "pip"
#ansible.verbose = "vvvv"
#ansible.extra_vars = {
# admin_user: 'ubuntu'
#}
end
end