|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! |
| 5 | +VAGRANTFILE_API_VERSION = "2" |
| 6 | + |
| 7 | +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
| 8 | + |
| 9 | + config.vm.box = "bento/ubuntu-16.04" |
| 10 | + |
| 11 | + # Make virtualbox use 1GB RAM. Compilation of libraries like lxml may fail for |
| 12 | + # less than 1GB RAM. |
| 13 | + config.vm.provider "virtualbox" do |v| |
| 14 | + v.memory = 1024 |
| 15 | + end |
| 16 | + |
| 17 | + # Create a forwarded port mapping which allows access to a specific port |
| 18 | + # within the machine from a port on the host machine. In the example below, |
| 19 | + # accessing "localhost:8080" will access port 80 on the guest machine. |
| 20 | + config.vm.network :forwarded_port, guest: 80, host: 8080 |
| 21 | + |
| 22 | + # Create a private network, which allows host-only access to the machine |
| 23 | + # using a specific IP. |
| 24 | + config.vm.network :private_network, ip: "192.168.33.12" |
| 25 | + |
| 26 | + # Create a public network, which generally matched to bridged network. |
| 27 | + # Bridged networks make the machine appear as another physical device on |
| 28 | + # your network. |
| 29 | + # config.vm.network :public_network |
| 30 | + |
| 31 | + # If true, then any SSH connections made will enable agent forwarding. |
| 32 | + # Default value: false |
| 33 | + # config.ssh.forward_agent = true |
| 34 | + |
| 35 | + # Share an additional folder to the guest VM. The first argument is |
| 36 | + # the path on the host to the actual folder. The second argument is |
| 37 | + # the path on the guest to mount the folder. And the optional third |
| 38 | + # argument is a set of non-required options. |
| 39 | + config.vm.synced_folder "./", "/home/vagrant/{{ cookiecutter.github_repository }}/" |
| 40 | + |
| 41 | + config.vm.provision "ansible" do |ansible| |
| 42 | + ansible.playbook = "provisioner/site.yml" |
| 43 | + ansible.host_key_checking = "False" |
| 44 | + ansible.inventory_path = "provisioner/hosts" |
| 45 | + ansible.verbose = "v" |
| 46 | + ansible.limit = "vagrant" |
| 47 | + end |
| 48 | +end |
0 commit comments