What is dynamic inventory in Ansible

0 votes

Hi Guys,

I am new to Ansible. I don't know too much about inventory file. Can anyone tell me what is dynamic inventory?

Sep 20, 2020 in Ansible by akhtar
• 38,170 points
46 views

1 answer to this question.

0 votes

Hi@akhtar,

In a configuration especially a cloud setup such as AWS where the inventory file keeps constantly changing as you add or decommission servers, keeping tabs on the hosts defined in the inventory file becomes a real challenge. It becomes inconvenient going back to the host file and updating the list of hosts with their IP addresses.

And this is where a dynamic inventory comes to play. A dynamic inventory is a script written in Python, PHP, or any other programming language. It comes in handy in cloud environments such as AWS where IP addresses change once a virtual server is stopped and started again.

Ansible already has developed inventory scripts for public cloud platforms such as Google Compute Engine, Amazon EC2 instance, OpenStack, RackSpace, cobbler, among others.

answered Sep 20, 2020 by MD
• 95,060 points

Related Questions In Ansible

0 votes
1 answer

What is the difference between the host file and an inventory file in ansible?

Actually both are same. hosts file is ...READ MORE

answered Feb 12, 2019 in Ansible by Amith
• 140 points
1,875 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

what is the difference between tags and delegate_to in ansible?

Hey @Rajendra, If you wish to perform ...READ MORE

answered Sep 24, 2019 in Ansible by Kalgi
• 52,310 points
675 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
954 views
+2 votes
1 answer
0 votes
1 answer

What is a template in Ansible?

Hi@akhtar, Managing configurations of multiple servers and environments are ...READ MORE

answered Aug 2, 2020 in Ansible by MD
• 95,060 points
83 views
0 votes
1 answer

What is the ask_pass module in Ansible?

Hi@akhtar, Ask_pass is the control module in an ...READ MORE

answered Aug 11, 2020 in Ansible by MD
• 95,060 points
230 views