Last active
August 29, 2015 14:05
-
-
Save agonzalezro/7338586f69657844033f to your computer and use it in GitHub Desktop.
vagrant + docker: create a vagrant box already ansible-provisioned with docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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