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, 2019 in Ansible by Keshav
8,002 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, 2019 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, 2019 in Ansible by Kalgi
• 52,350 points
1,919 views
0 votes
0 answers

what is the difference between tags and delegate_to in ansible?

Sep 23, 2019 in Ansible by Rajendra
• 510 points

closed Sep 24, 2019 by Kalgi 821 views
+1 vote
2 answers

What is the difference between ansible playbook and roles?

Hi, Roles: Roles containing certain vars_files, tasks, and handlers ...READ MORE

answered Jan 21, 2020 in Ansible by vivek
• 530 points
21,823 views
0 votes
1 answer
0 votes
1 answer
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,460 points
3,060 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP