Ansible Playbook with dynamic inventory

--

Ansible Playbook for dynamically updating the inventory with the new container IP to deploy a webserver in it!

Playbook:

Running the playbook:

Inventory gets dynamically updated as we used blockinfile module and retrieved ip using ansible facts.

The inventory has been updated; the IP of our container is 172.17.0.2

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

--

--

No responses yet

Write a response