Configure The LoadBalancer On EC2 Instance !!

Lets Start😎 !!

Lets Write an Dynamic Playbook In Such a way we can lunch the Instance as Per Our Need.
→ Launch the 3 Instances for the Web-Server -

  • count — will help us to run the number of instance according to our need
  • aws_access_key && aws_secret_key — Now this will be provided when you will create the IAM role for the user . We need provide power to launch or configure the instance.

Now For Directly Providing the Access_Key and Secret_Key in the Playbook is not an Good Idea 😎 .
Here, We can take the help of ansible vault . In this feature of ansible we can protect our precious data . Here are the Steps to Keep Your Data Safe !!

Run the Playbook !

WebServer Instances Lunched
LoadBalancer Instances Lunched

2. Write the PlayBook For Configuring the WebServer && LoadBalancer.

In this Case I will use role as you know it just like plug in play which is easy to use.
More About Role →

For Capturing the IP we can take the Help of Dynamic Inventory . In this case tag play an important role.

Some Demos —

Retrieving IP according to the Tag

Now, At the Configuration File We can retrieve the Application IP’s by the help of tag_Name_web.

Lets Run The Role’s :

Cyber Security Enthusiasm || Docker || RHEL8 || Working On Web Development || CTF Player || Machine Learning || Flutter Developer || Ansible || K8s