Created
October 7, 2015 20:40
-
-
Save ilkka/2498c9d0d9fa7876f6f7 to your computer and use it in GitHub Desktop.
multi machine Vagrantfile with provisioning
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 : | |
Vagrant.configure(2) do |config| | |
config.vm.define 'first' do |first| | |
first.vm.box = "trusty-server-cloudimg-i386" | |
first.vm.hostname = "first" | |
first.vm.provision "shell", inline: <<-SHELL | |
echo "this runs only in 'first', now in `hostname`" | |
SHELL | |
end | |
config.vm.define 'second' do |second| | |
second.vm.box = "trusty-server-cloudimg-i386" | |
second.vm.hostname = "second" | |
second.vm.provision "shell", inline: <<-SHELL | |
echo "this runs only in 'second', now in `hostname`" | |
SHELL | |
end | |
config.vm.provision "shell", inline: <<-SHELL | |
echo "this runs twice, now in `hostname`" | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment