Book Image

Creating Development Environments with Vagrant

By : MICHAEL KEITH PEACOCK
Book Image

Creating Development Environments with Vagrant

By: MICHAEL KEITH PEACOCK

Overview of this book

Table of Contents (17 chapters)
Creating Development Environments with Vagrant Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Provisioning with SSH – a recap


As we discussed in Chapter 2, Managing Vagrant Boxes and Projects, we can instruct Vagrant to run a series of SSH commands on the VM. This can be used to provision the server.

There are two ways to use SSH provisioning:

  • Path: This provides a file to execute

  • Inline: This is used to provide specific commands to run

Both of these are shown as follows:

config.vm.provision "shell", path: "provision/setup.sh"
config.vm.provision "shell", inline: "apt-get install apache2"