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
1,301 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
• 51,950 points
527 views
0 votes
0 answers

what is the difference between tags and delegate_to in ansible?

Sep 23, 2019 in Ansible by Rajendra
• 480 points

closed Sep 24, 2019 by Kalgi 88 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 in Ansible by vivek
• 530 points
5,877 views
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 in Ansible by MD
• 55,060 points
49 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
672 views
+2 votes
1 answer