Ansible Automation Lab With RHEL 8 ( English )

What I want to share today is how to implement Ansible Automation Lab on KVM (Kernel Based Virtual Machine).

It can also be implemented on VirtualBox, VMWare Workstation. Procedures are the same.

Ansible Automation Lab Minimum Hardware Requirements a

  • 1GB RAM & 40GB HDD for control node
  • 512MB RAM & 20GB HDD for Managed node

I use RHEL 8 (Ootpa) for Linux VM

For the Lab

Control Node = 1 VM

Managed Node = 4 VM (2VM or 1VM up to you)

> vim / etc / hosts

First, mark the FQDN and IP in our Host VM / etc / hosts file.

** We will first create a Local Repo on the Control Node

** Prerequisite **

** We must first register the control node vm RHEL Developer Subscription

** If you can’t install with yum, you can install with pip

# First create a local repo using the apache server on the control node

** Create a local.repo file at #etc/yum.repos.d/

** Enter ALL after Options **

** If you no longer need the RHEL Developer Subscription

** Copy local.repo on managed node vm using scp

  • [email protected] # for i in node {1..4}; do scp /etc/yum.repos.d/local.repo root @ $ i.lab.example.com: /etc/yum.repos.d/

** http port must be opened on control node vm

** In managed node vm

** Now the http local repo creation part is done

** Ansible Lab **

  • For ansible lab, you must first create a ssh-keygen and sudoers file for student user

** You must create an ansible config file & inventory file **

[email protected] # vim inventory

** ansible lab testing (localhost) **

** ansible lab testing managed hosts (remote) **

** Example Ansible Playbook **

** Ansible playbook use cases can be found at the following github links **

https://github.com/Htunn

** Thanks For Your Time Mate ^. ^ **

Leave a Reply

Your email address will not be published. Required fields are marked *