This roq-vagrant repository is useful as a template, if you want to validate a specific configuration using a virtual machine.

A number of Linux distributions have been set up

  • CentOS 7 and 8

  • Debian 9 and 10

  • Ubuntu 18.04 and 20.04

These scripts are used to test roq-ansible (Ansible Roles) with different assumptions about Linux environments.


The latest major releases are typically being tested for a selection of Linux distributions.

Vagrant uses a Vagrantfile to configure the virtual machine, including an optional script for provisioning.

For example, the Ubuntu 18.04 Vagrantfile may look similar to this

 1Vagrant.configure("2") do |config|
 2 = "ubuntu/bionic64"
 3  config.vm.define "vm_test"
 4 "private_network", ip: ""
 5  config.vm.provider "virtualbox" do |vb|
 6    vb.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
 7    vb.memory = "4096"
 8    vb.cpus = 4
 9  end
10 "forwarded_port", guest: 80, host: 10080
11  config.vm.provision "shell" do |shell|
12    shell.inline = "apt-get update && apt-get install -y python"
13  end
14  config.vm.provision "ansible" do |ansible|
15    ansible.inventory_path = "../vm_test"
16    ansible.playbook = "../site.yml"
17  end

The assumption is that you are in this directory and your environment has access to

  • Vagrant

  • VirtualBox

  • Ansible Playbook

Then you can simply start the virtual machine by typings this

1vagrant up


This will take some time!

The provisioning may fail (network timeout or other transient issue), in which case you can attempt to continue

1vagrant provision

Once completed successfully, you can access your virtual machine

1vagrant ssh

Finally, you can instruct your virtual machine to stop

1vagrant halt