Skip to content

Instantly share code, notes, and snippets.

@agonzalezro
Last active August 29, 2015 14:05
Show Gist options
  • Save agonzalezro/7338586f69657844033f to your computer and use it in GitHub Desktop.
Save agonzalezro/7338586f69657844033f to your computer and use it in GitHub Desktop.
vagrant + docker: create a vagrant box already ansible-provisioned with docker
---
- hosts: all
sudo: true
tasks:
- apt_repository: repo='deb https://get.docker.io/ubuntu docker main' state=present update_cache=yes
- apt: name=lxc-docker force=yes
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
ansible.extra_vars = { ansible_ssh_user: 'vagrant' }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment