Running basic shell commands

The most basic method of provisioning is to run simple shell commands in the Vagrant machine. For Linux environments, this typically means executing basic shell commands with shells that are typically bundled with distributions (sh, bash, zsh, and so on). The provisioning process can also execute other command-line applications if runtime environments are installed (such as system provisioning with Ruby or Perl).

In this example, we'll use a shell command to install a basic Message of The Day command to output a greeting on login using the vagrant ssh command.

How to do it...

  1. We'll start this example with a simple Vagrantfile that boots a basic Ubuntu environment. Here is the complete Vagrantfile:
    # -*- mode: ruby -*- ...

Get Vagrant Virtual Development Environment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.