
🔰 Ansible playbook that will retrieve new Container IP and update the inventory. So that further Configuration of Webserver could be done inside that Container.

ANSIBLE CONFIGURATION FILES

INVENTORY FILE ( EMPTY IN THE BEGNING)

TEMPLATE FILE USED TO ADD DOCKER IP AND AUTHENTICATION DETAILS INSIDE THE EMPTY INVENTORY FILE

AT THE END SETUP.YML FILE WHICH IS USED TO DO ALL THE TASK

LET ME EXPLAIN THIS PLAYBOOK.
1st hosts ie localhost which is used to launched the container in that ssh is already enabled as well as sshd service will also automatically starting becauese i added service started code inside .bashrc file. Next Setup is to fetch the ip address and then using template putting that ip with ssh user name and password putting inside the inventory file.2nd hosts will configure the webserver inside the docker.
Now Let’s run the playbook


TASK 14.2 COMPLETED ….
For any query ping me and connect with me on LinkedIn www.linkedin.com/in/vineet-negi