Create a gist now

Instantly share code, notes, and snippets.

Embed
Vagrant Box with installed Ansible inside
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder "~/.ssh", "/home/vagrant/ssh-host"
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update -y
sudo apt-get install -y software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update -y
sudo apt-get install -y ansible
cp /home/vagrant/ssh-host/* /home/vagrant/.ssh/.
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment