Vagrant for DevOps: Ansible provisioning

I was asked to show how Ansible can work together with Vagrant.
In my example I’ll install, enable and configure UFW firewall on Ubuntu, then machine will be rebooted and uptime will be shown.
It’s really simple task, so just have a look at Vagrantfile and playbook:

[pastacode lang=”bash” user=”kagarlickijd” repos=”vagrant” path_id=”ansible/Vagrantfile” revision=”” highlight=”” lines=”” provider=”github”/]

[pastacode lang=”bash” user=”kagarlickijd” repos=”vagrant” path_id=”ansible/playbook.yml” revision=”” highlight=”” lines=”” provider=”github”/]

And the final result:

Screen Shot 2016-06-07 at 17.14.57

Screen Shot 2016-06-07 at 17.15.55

Vagrant for DevOps table of contents