-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile.j2
21 lines (19 loc) · 949 Bytes
/
Vagrantfile.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "vagrantbox" do |vagrantbox|
vagrantbox.vm.box = "{{ os[os_choice].vagrant_machine }}"
vagrantbox.vm.network "private_network", ip: "192.168.151.101"
vagrantbox.vm.hostname = "vagrantbox"
config.vm.provision "shell",
inline: "apt-get update && apt-get install python-software-properties -y && apt-get install software-properties-common -y && apt-add-repository ppa:ansible/ansible && apt-get update && apt-get install ansible -y && cp /vagrant/hosts /etc/ansible/hosts"
if Vagrant.has_plugin?("vagrant-ansible-local")
config.vm.provision "ansibleLocal", playbook: "main.yml"
else
config.vm.provision "shell",
inline: "ansible-playbook /vagrant/main.yml"
end
end
end