Creating Ansible Playbook To Create Dynamic Inventory

Vanshita Mittal
Jan 25, 2021

--

Task Description📄

🔰 14.2 Further in ARTH — Task 10 have to create an Ansible playbook that will retrieve newContainer IP and update the inventory. So that further Configuration of Webserver could be done inside that Container.

🔰 Steps :

  1. Firstly , ansible setup should be complete in the controller node.

2. Now , create a html file for webpage in the same folder in which playbook is created.

3. Created a file to retrieve the ip of docker container launched by playbook

4. playbook named webos.yml

it will retrieve the ip of docker os and then store it in ip.txt file

Now , Run the playbook .

5. Now , check the ip of docker container.

Now , to see webpage :

✨✨Task is successfully completed !!!

Thank You !!

--

--

No responses yet