Hello Guys ๐โโ๏ธ In this article we are going to perform the following task.
Task Description:
Further in ARTH- Task 10 have to create an Ansible Playbook that will retrieve new Container IP and update the Inventory. So that further Configuration of Web server could be done inside that controller.
For this practical firstly we need to set up an Ansible cluster. We need to use one Controller Node on which we are going to run the playbook and One Target Node. By using this playbook we are going to launch Docker Container On Target Node and we want the IP of the container dynamically updated in inventory.
First, you need to add the IP of Target Node inside Inventory.
vim ip.txt
vim newip.txt
Let's write the playbook now
Let's run this playbook now
Our Playbook has run Successfully.
Now we are going to write the playbook for configuring the webserver
let's check the inventory now
You can see it has been updated.
let's check whether the container has launched or not
Our container has launched successfully.
Our task completed successfully!!!!
Thanks For Reading๐๐๐