Ansible & Vagrant Guide Book

Ansible & Vagrant Guide Book | Definition and features
Feb 24, 2024
Ansible & Vagrant Guide Book

Introduction

Thank you for clicking through to my arcticle. I've been a DevOps engineer for 2 years in dev-team of 7 engineers.

My name is MINSEOK, LEE, but I use Unchaptered as an alias on the interenet. So, you can call me anythings "MINSEOK, LEE" or "Unchaptered" to ask something.

Topics

This article is part of a series.
Are you a engineer using Ansible, Ansible-Playbook in a VM environment? You can use Vagrant to easily provision and manage VMs on different OS and Platform.

  • What is the Vagrant?

  • Why learn Vagrant when you're laerning Ansible?

Prerequisites

What is the Vagrant?

Vagrant is some kind of provisioning tools for VMs.

  • Allocate, deploy and distribute system resources for each VMs.

  • Having your system ready to go when you need it.

Configuration of Practice in Article.

  1. Internet

  2. Host Machine

  3. Virtual Box in Host Machine

  4. Ansible-Server(CentOS)

[Connections]

  • Bridge Network between Internet and host machine

  • Network to connect internet,

Process of Practice in Article.

  1. Install notepad++
    Or if you already used IDE tools , you can use that tools. Such as VSC.

  2. Install Vagrant and initialization

    1. HashiCorp | Install Vagrant
      Download vagrant(I696)

  3. Fix Vagrantfile and Install Plugins.

  4. Install CentOS Image

  5. Test Connection using Vagrant SSH.

Basic Command in Vagrant

  • vagrant init | Create example scripts for provisioning

  • vagrant up | To start provisioning, read the Vagrantfile

  • vagrant halt | End hosts, handled by Vagrant.

  • vagrant destroy | Remove hosts in Vagrant.

  • vagrant ssh | Connect by SSH to hosts in Vagrant.

  • vagrant provision | Apply the setting change into hosts in Vagrant.

Share article

Unchaptered