inblog logo
|
Unchaptered
  • LinkedInGitHub
  • Monthly-CS
Ansible

How to configure practice environment of Ansible using Vagrant?

Configure using VirtualBox, Vagrant
Feb 24, 2024
How to configure practice environment of Ansible using Vagrant?
Contents
IntroductionTopicPrerequisitesUpdate default vagrant fileCreate Bootstrap ShellScript to maintain Vagrantfile simple.Sample Codes

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.

Topic

Using vagrant, let's configure our environment to use Ansible Core.

Prerequisites

To follow this guide book, you must install VMWare.
Therefore, you need to follow along with "How to configure practice environment of Ansible? # STEP 1 : Install Virtual Box".

  • Ansible Guide Book Series

    • What is the Ansible?

    • How to configure practice environment of Ansible?

    • What is the Ansible Core?

    • Ansible with PUTTY

    • Ansible Practices

    • Ansible Playbook

    • Ansible Tips (IDE, Vim)

    • Ansible Tips (IDE, Output)

Update default vagrant file

  1. Modify Hostname for Vagrant

  2. Modify Hostname for VirtualBox

  3. Modify Hostname for HostMachine

  4. Disable Sync Directory between HostMachine and VirtualMachine

  5. Set up IP Address to connect internet

  6. Change HostMachine Port to be similar with IP Address.

Create Bootstrap ShellScript to maintain Vagrantfile simple.

  1. Install EPEL using Yum

  2. Install Ansible using Yum

Sample Codes

  • In this codes, you can use vagrant up and vagrant ssh ansible-server

    • https://github.com/unchaptered/iac-storage/tree/main/vagrant/second-vagrant

Share article
Contents
IntroductionTopicPrerequisitesUpdate default vagrant fileCreate Bootstrap ShellScript to maintain Vagrantfile simple.Sample Codes

Unchaptered

RSS·Powered by Inblog