Skip to content

Combo with a bunch of Vagrantfiles, to setup local and/or ephemeral Virtual machines.

License

Notifications You must be signed in to change notification settings

macunha1/Vagrantfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vagrantfiles

Combo with a bunch of Vagrantfiles, to setup local and/or ephemeral Virtual machines.

The main motivation was to test Ansible. So, most of the Vagrantfiles carries python installed by default. Also, they have a copy of the host machine default public RSA key, which allows easy connection with ssh vagrant@$IP facilitating Ansible inventory setup

Getting Started

Prerequisites

Install a VM provider supported by Vagrant, most popular is VirtualBox.

For libvirt support the following plugin is necessary

vagrant plugin install vagrant-libvirt

Last step is (of course) Vagrant.

Then, you're setted up!

Quickstart

Usage

To download all base vagrant boxes just run the following (assuming that you're on a POSIX/Unix/Linux-based operating system)

find . -name Vagrantfile -type f \
    -exec awk '/config\.vm\.box/{print $NF}' {} + | \
    sort | uniq | \
    xargs -P 4 -I{} vagrant box add {} \
        --provider "${VAGRANT_PROVIDER:-virtualbox}"

You can configure your VM default values for vCPUs and RAM with:

export VAGRANT_CPU_CORE=2 # Number of vCPUs to dedicate
export VAGRANT_RAM_GB=4 # Allocated RAM in GB
export VAGRANT_PROVIDER=libvirt # alternative VM provider
export VAGRANT_IPV4_ADDRESS=192.168.50.111 # default Ipv4 address for VM

Set those values in your $HOME/.profile or ${HOME}/${SHELL}rc (as you wish) to store the configuration.

After downloading base boxes, you can run your desired operating system with

cd $DESIRED_OPERATING_SYSTEM && vagrant up

Contribute

PRs Welcome

  • Feel free to fill an issue with feature request(s), or to send me a Pull request, I will be happy to collaborate.

  • If the code don't work, or if you found some bug during the execution, let me know.

About

Combo with a bunch of Vagrantfiles, to setup local and/or ephemeral Virtual machines.

Topics

Resources

License

Stars

Watchers

Forks

Languages