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
64 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
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,480 points
208 views
0 votes
1 answer
0 votes
1 answer

Is it possible to run an Ansible Playbook in python script?

Hey @Cerci, Of course its possible. You ...READ MORE

answered Jan 17 in Ansible by Nicolas
511 views
+13 votes
2 answers
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.