From 9c1ddf65c89489f2df071e04b7f4ab28355b9b5f Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Date: Wed, 20 Dec 2023 20:03:45 +0530 Subject: [PATCH] Add back vagrantfile --- .../Vagrantfile | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 {{cookiecutter.github_repository}}/Vagrantfile diff --git a/{{cookiecutter.github_repository}}/Vagrantfile b/{{cookiecutter.github_repository}}/Vagrantfile new file mode 100644 index 00000000..6e3e5622 --- /dev/null +++ b/{{cookiecutter.github_repository}}/Vagrantfile @@ -0,0 +1,48 @@ +# -*- 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.box = "bento/ubuntu-16.04" + + # Make virtualbox use 1GB RAM. Compilation of libraries like lxml may fail for + # less than 1GB RAM. + config.vm.provider "virtualbox" do |v| + v.memory = 1024 + end + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + config.vm.network :forwarded_port, guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + config.vm.network :private_network, ip: "192.168.33.12" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + # config.vm.network :public_network + + # If true, then any SSH connections made will enable agent forwarding. + # Default value: false + # config.ssh.forward_agent = true + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + config.vm.synced_folder "./", "/home/vagrant/{{ cookiecutter.github_repository }}/" + + config.vm.provision "ansible" do |ansible| + ansible.playbook = "provisioner/site.yml" + ansible.host_key_checking = "False" + ansible.inventory_path = "provisioner/hosts" + ansible.verbose = "v" + ansible.limit = "vagrant" + end +end