Ansible Configure Default Inventory File
Last updated
By default, Ansible would attempt to read the default configuration file at /etc/ansible/hosts, we can specify the default configuration file to use by creating an Ansible configuration file.
Create ansible.cfg file in home directory, or project directory.
Configure the ansible.cfg file in home directory, & add [defaults] section:
[defaults]
inventory = ~/.ansible/hostsSource: StackOverFlow
Reference(s):
Last updated