Vagrant test environment with prepared scenarios
- Install vagrant. You can download the latest version here.
- Install virtualbox and/or libvirt including dev dependencies (e.g. libvirt-dev on debian distributions).
- Install vagrant plugins.
vagrant plugin install vagrant-hostmanager vagrant plugin install vagrant-libvirt vagrant plugin install vagrant-mutate vagrant plugin install vagrant-share
Environments are seperated in different directories which are self contained with the exception of plugins/custom extensions for vagrant.
cd <directory>
vagrant up
vagrant destroy -f
vagrant box update
vagrant box prune
Manages /etc/hosts
file of the system to ensure virtual machines are reachable by .vagrant. To ensure every user in sudo group can update /etc/hosts
the sudoers file needs to be modified:
# vagrant-hostmanager
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp */.vagrant.d/tmp/hosts.local /etc/hosts
%sudo ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE
This of course can also be specific to one user instead of %sudo
.
Plugin: plugins/key_authorization.rb
Ensures the users public key is situated on every virtual machine. This way a passwordless login is possible.gg
New roles need to be added from within the .ansible
directory with the command:
ansible-galaxy install <author.role>
MIT