Book Image

Hands-On DevOps with Vagrant

By : Alex Braunton
Book Image

Hands-On DevOps with Vagrant

By: Alex Braunton

Overview of this book

Hands-On DevOps with Vagrant teaches you how to use Vagrant as a powerful DevOps tool and gives an overview of how it fits into the DevOps landscape. You will learn how to install VirtualBox and Vagrant in Windows, macOS, and Linux. You will then move on to understanding Vagrant commands, discovering its boxes and Vagrant Cloud. After getting to grips with the basics, the next set of chapters helps you to understand how to configure Vagrant, along with networking. You will explore multimachine, followed by studying how to create multiple environments and the communication between them. In addition to this, you will cover concepts such as Vagrant plugins and file syncing. The last set of chapters provides insights into provisioning shell scripts, also guiding you in how to use Vagrant with configuration management tools such as Chef, Ansible, Docker, Puppet, and Salt. By the end of this book, you will have grasped Vagrant’s features and how to use them for your benefit with the help of tips and tricks.
Table of Contents (21 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Installing Ansible


In this first part, we will learn how to install Ansible on our host machine, which in this instance is the macOS. Later in this chapter, we will learn how to install Ansible on Ubuntu, which will be running inside our guest Vagrant machine.

Installing Ansible on macOS High Sierra (version 10.13)

Before we can start provisioning our Vagrant machine using Ansible, we first need to install it on our host machine. We won't look at any advanced installations – just the basics to get Ansible up and running on our machine. If you are using another operating system, then please feel free to use the excellent Ansible docs available at https://docs.ansible.com/:

  1. We first need to visit the Installation Guide page at https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html.
  2. There is a list of supported operating systems, but we need to click on the Latest Releases on macOS section.
  3. Here, we will see that the preferred option is to install Ansible via pip.
  4. You...