How to induct Ansible in the AWS DevOps work flow?



  • Currently i’m learning AWS and DevOps. I was given this scenario to implement. I was hired as an Ansible Engineer and my role is to induct the Ansible in the DevOps workflow (GIT->Jenkins->AWS Infrastructure). How will you induct the Ansible for Configuration Management.

    Please Correct me if I’m wrong.

    My answer was:

    Write a pipeline in jenkins which will execute the aws cli command to get the public ip addresses of the instances behind the ALB.
    Write a pipeline in jenkins which will add the id_rsa.pub of Ansible master to all the instances.(or else adding IAM role of ec2 instances to the current jenkins server).
    Execute the another pipeline with Ansible playbook where we will update the public ip addresses in the inventory file and run it.
    With the above approach I have few doubts which are as follows:

    At the time of creating the Jenkins pipeline (to get public ip addresses) we might have 150 instances at that given point of time. What if the new instances are added to the load balancer in the meanwhile?. so how to include them as they will get new public addresses and by the time all the above 3 jobs will already been ran.

    Needed a better and fully controlled approach on this. Please improve my approach.

    AWS learner in need of your help.


 

DMCA Policy

Looks like your connection to PhatWallet was lost, please wait while we try to reconnect.