Ansible playbook that will retrieve new Container IP and dynamically update the inventory and Configure web-server inside that Docker Container

Nityachawda
Mar 31, 2021

We will start our setup by writing a playbook.

We will see our ip.txt file.

Now we will run our playbook .

The ip of the container is 172.17.0.1. Let’s check if it is updated in the file.

Now we will launch we server inside our container.

Lets check if the web server is configured .

And our server is configured using dynamic ip.

Thank you!!!!

--

--