Vineet Negi
2 min readMar 29, 2021

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

FILES AND FOLDERS

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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Vineet Negi
Vineet Negi

Written by Vineet Negi

★ Aspiring DevOps Engineer ★ Technical Volunteer @LinuxWorld ★ Technical Content Writer @Medium ★ ARTH Learner

No responses yet

Write a response