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

0 votes
What is the difference between the host file and an inventory file in ansible?
Feb 9 in Ansible by Keshav
382 views

1 answer to this question.

0 votes
Actually both are same. hosts file is the default inventory file with this default name in ansible after it's installation. We can have multiple inventory files (with any name, can also be a .ini file) and refer to the adhoc commands with -i attribute. We just have to follow the syntax for declaring groups or host names. hosts/inventory file can be in any path in the system where ever ansible command works.
answered Feb 12 by Amith
• 140 points

Related Questions In Ansible

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 in Ansible by Kalgi
• 41,170 points
33 views
0 votes
0 answers

what is the difference between tags and delegate_to in ansible?

Sep 23 in Ansible by Rajendra
• 420 points

closed Sep 24 by Kalgi 22 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,890 points
1,263 views
+13 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,380 points
174 views
0 votes
1 answer