Automating EC2 instance creation via Ansible

Before getting into the details I need to share some things.

  • Every technology is new for an absolute beginner, so keep the "Can I make it work" thought out of your mind.
  • You may fail an unimaginable number of times, but the more you fail the better will be the outcome.
  • There is a word with the strange pronunciation "lethargy", Please keep an eye on it (You can Google the meaning)

Let's look at the steps that I followed.

Note: Initially my idea was something like this: I got an AWS free tier account, We all know how to create an EC2 instance from the web interface of AWS, so let's create an EC2 instance by following the traditional way, once an EC2 instance is created we can use the instance as our Ansible controller to create (automate) n number of EC2 instances.

             

The prerequisites are mentioned below.

The following operations are performed inside an EC2 instance in AWS that running the RHEL8 operating system.