Tutorial by Examples

Vagrantfile Vagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" config.vm.provision "ansible" do |ansible| ansible.playbook = "vagrant-playbook.yml" end end vagrant-playbook.yml --- - hosts: default tasks: - name: ...
vagrant up By default the box will be provisioned.
vagrant up --no-provision
vagrant provision
The shell provisioner runs a shell script when provisioning. $setup = <<SETUP # You can write your shell script between here ... sudo echo "Hello, World!" > /etc/motd.tail # ... and here. SETUP Vagrant.configure("2") do |config| config.vm.box = "ubuntu/tr...
# provision/bootstrap-controller.sh : path and shell filename from vagrantfile location config.vm.define "configcontroller" do |controller| ... controller.vm.provision :shell do |shell| shell.path = "provision/bootstrap-controller.sh" end ...

Page 1 of 1