Create a local VM and configure it with Vagrant and a custom Ansible role

In this story, I will show how to create a Virtual Machine with Vagrant that we will configure with Ansible. For that, we will create an Ansible role.

The Vagrantfile

In first, let’s create the Vagrantfile to create the VM:

Vagrant.configure("2") do |config| = "bento/ubuntu-16.04" "forwarded_port", guest: 80, host: 8086
config.vm.provision "ansible_local" do |ansible|
ansible.playbook =



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bruno Delb

Bruno Delb

Blockchains, DevOps, Agile Coaching, development, testing, Cloud, Management 3.0, ITIL. It defines me.