Skip to content

Instantly share code, notes, and snippets.

@sparsick
Last active October 20, 2020 15:07
Show Gist options
  • Save sparsick/b36b81c291c556ebdcc94f224136abc8 to your computer and use it in GitHub Desktop.
Save sparsick/b36b81c291c556ebdcc94f224136abc8 to your computer and use it in GitHub Desktop.
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